vux日历和时间插件禁止选择未来的时间

<calendar title="" v-model="vaccineTime" placeholder="请选择日期" show-popup-header disable-future></calendar>
<calendar title="" v-model="vaccineNextTime" placeholder="请选择日期" show-popup-header disable-past></calendar>

日历组件可以在组件上直接使用disable-future或disable-past来禁止未来和过去

时间选择器需要用js得到今天的日期

var time = new Date();
time.setTime(time.getTime());
var today = time.getFullYear()+"-" + (time.getMonth()+1) + "-" + time.getDate();

然后赋值到属性中

发布了13 篇原创文章 · 获赞 1 · 访问量 5628

猜你喜欢

转载自blog.csdn.net/sinrryzhang/article/details/102460620
今日推荐