罗文
罗文
  • 发布:2019-06-15 18:24
  • 更新:2019-06-15 18:48
  • 阅读:814

【报Bug】picker组件的time模式和date模式有几个bug

分类:uni-app

详细问题描述

看我操作视频,重点关注开始放单时间那一行。
1.date模式下,选择器默认选择的日期跟value不一致。
2.选择年份,点确定,value没有月份。选了月份的话,正常。
3.time模式下,同样默认选中的时间跟value不一致。

  1. 选择时,点确定,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();
},

2019-06-15 18:24 负责人:无 分享
已邀请:
罗文

罗文 (作者)

iPhone7p Ios12 系统自带浏览器测试也一样。

罗文

罗文 (作者)

我自查出来了,不兼容2019-6-15和18:9这样的格式,改成2019-06-15 和 18:09即可正常.

该问题目前已经被锁定, 无法添加新回复