将bind:input 换成 bind:change 事件 去掉value绑定值文章来源地址https://www.toymoban.com/news/detail-567942.html
在这里插入代码片
<van-popup show="{{ showFinishTime }}" bind:close="onCancelFinishTime" round position="bottom" custom-style="height: 50%;">
<van-datetime-picker type="datetime" min-date="{{ minDate }}" bind:change="onInputFinishTime" bind:cancel="onCancelFinishTime" bind:confirm="onConfirmFinishTime" />
</van-popup>
**
## //js
**
`` onInputFinishTime(event) {
const time = event.detail.getValues()
const times = time[0] + '-' + time[1] + '-' + time[2] + " " + time[3] + ":" + time[4]
this.setData({
currentDate: times
})
},
文章来源:https://www.toymoban.com/news/detail-567942.html
到了这里,关于vant的DatetimePicker 时间选择在微信小程序中使用时跳来跳去的解决办法的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!