一、bug演示
1、依照官方代码,mode=“date”,已经设置为显示年月日
<u-datetime-picker :show="show" v-model="value1" mode="date"></u-datetime-picker>
2、修改日期的时候绑定的value1值显示出来却是时间戳
二、解决方法
confirm的方法中格式化时间
confirm(e) {
value1 = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
},
一、bug演示
1、依照官方代码,mode=“date”,已经设置为显示年月日
<u-datetime-picker :show="show" v-model="value1" mode="date"></u-datetime-picker>
2、修改日期的时候绑定的value1值显示出来却是时间戳
二、解决方法
confirm的方法中格式化时间
confirm(e) {
value1 = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
},