销售网站排名,销售型网站模板,手机单页面网站模板,18款禁用软件app破解版项目中需要用到日期和时间一同选择的场景 本来想用 如下代码 van-datetime-picker 发现咋整也不好使 刚开始还以为是引入的问题 后来发现是vant4根本就没这玩应了…
van-datetime-pickerv-modelcurrentDatetypedatetimetitle选择完整时间van-datetime-pickerv-modelcurrentDatetypedatetimetitle选择完整时间:min-dateminDate:max-datemaxDate
/官网文档vant4的DatePicker是没有的 vant2才有
后来没招了 把日期和时间分开写了 van-fieldv-modeldateis-linkname日期label日期placeholder请选择日期clickshowDatePopup true/van-popup v-model:showshowDatePopup round positionbottomvan-date-picker v-modelcurrentDate typedatetime title选择日期 confirmonDateConfirm //van-popupvan-fieldv-modeltimeis-linkname时间label时间placeholder请选择时间clickshowTimePopup true/van-popup v-model:showshowTimePopup round positionbottomvan-time-picker v-modelcurrentTime title选择时间 confirmonTimeConfirm //van-popupdata() {return { showDatePopup: false,showTimePopup: false, date: ,time: ,currentDate: [],currentTime: [],}},onDateConfirm() {this.showDatePopup falsethis.date this.currentDate[0] - this.currentDate[1] - this.currentDate[2]},onTimeConfirm() {this.showTimePopup falsethis.time this.currentTime[0] : this.currentTime[1]},最后提交的时候 将日期和时间拼接 补00 obj.realityTime this.date this.time 00