Last active
June 23, 2020 09:00
-
-
Save moonflame/2604229aec51f41a69adf82bda94509d to your computer and use it in GitHub Desktop.
DatetimePicker bug (Vant Weapp)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Page({ | |
data: { | |
currentDate: new Date().getTime(), | |
minDate: new Date().getTime() | |
}, | |
onInput(event) { | |
this.setData({ | |
currentDate: event.detail, | |
}); | |
}, | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<van-datetime-picker | |
type="date" | |
value="{{ currentDate }}" | |
bind:input="onInput" // 删除该行可以去除“反复自动跳动”问题,但还可以复现“月份、日期异常跳动”问题 | |
min-date="{{ minDate }}" // 删除该行可以去除“月份、日期异常跳动”问题 | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment