Vant: [Bug Report] dateTimePicker 时间选择器 type 为time , 动态修改最小分钟,切换小时以后,获取到的分钟为00

Created on 5 Mar 2020  ·  5Comments  ·  Source: youzan/vant

设备 / 浏览器

微信内打开

Vant 版本

2.5.3

Vue 版本

3.0.0-alpha.7

重现链接

https://www.rexking.top/

描述问题

dateTimePicker 时间选择器 type 为time , 动态修改最小分钟。

不好意思,没准备链接。

切换小时以后,获取到的分钟为00

v-model="currentDate"
type="time"
:min-hour="minHour"
:min-minute="
currentDate.getTime() < new Date().getTime()
? currentDate.split(':')[0] > new Date().getHours()
? 0
: new Date().getMinutes()
: 0
"
@confirm="confirmDate"
@cancel="cancleDate"
/>

🐞 bug

All 5 comments

用 codesandbox 创建个链接吧

https://codesandbox.io/s/vant-issue-moban-0gh4j

  1. 不切换分钟
  2. 切换小时
    输出的分钟为 00 ,不是当前时间

已在 2.5.4 版本修复

麻烦打开我的测试链接测试一下,我看版本就是2.5.4,还是有这个问题,问题出现的原因是我动态设置了最小分钟

2.5.4 的 UI 和结果是一致的,你可以看下,选项的分钟为 00

Was this page helpful?
0 / 5 - 0 ratings