详细问题描述
看我操作视频,重点关注开始放单时间那一行。
1.date模式下,选择器默认选择的日期跟value不一致。
2.选择年份,点确定,value没有月份。选了月份的话,正常。
3.time模式下,同样默认选中的时间跟value不一致。
- 选择时,点确定,value没有分。选了分的话,正常。
IDE运行环境说明
hbx2.0.1
Windows8.1
uni-app运行环境说明
运行H5平台
在pc端chrome75上有这个问题,小米4C自带浏览器有这个问题。
重要代码
<view class="line">
<view class="label">开始放单时间:</view>
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="label" style="width: 180upx;height: 70upx;justify-content: flex-start;padding-left:16upx ;">{{date}}</view>
</picker>
<picker mode="time" :value="time" start="00:00" end="23:59" @change="bindTimeChange">
<view class="label" style="width: 180upx;height: 70upx;justify-content: flex-start;padding-left:16upx ;">{{time}}</view>
</picker>
</view>
onLoad() {
var now = new Date();
this.comedate = now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate();
this.startDate = this.comedate;
this.date=this.comedate;
this.endDate = now.getFullYear() + "-" + (now.getMonth() + 3) + "-" + now.getDate();
this.exitdate = now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + (now.getDate() + 1);
this.time = now.getHours() + ":" + now.getMinutes();
},