首先去下载laydate时间控件,引入到相应的模板中
<input type="text"val-required=""value=""date-laydate=""id="estab_dateA"class="initial_date laydate-icon"@click="dateBlock('#estab_dateA')"> <input type="text"val-required=""value=""date-laydate=""id="estab_dateB"class="initial_date laydate-icon"@click="dateBlock('#estab_dateB')"> <script>
import './../../scripts/base/laydate.js';
//绑定时间控件 dateBlock(str){ let $scope = this; laydate({ elem:str,//绑定的元素 type:'date', format:'YYYYMMDD',//时间格式20171219 position: 'static',//位置 istoday: true, //是否显示今天 done: (value) =>{ $scope.estabTime =value } }); }, </script>
<style>
@import "./../../styles/need/laydate.css";
</style>
vue中时间控件绑定多个输入框
免责声明:文章转载自《vue中时间控件绑定多个输入框》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇Java 迭代器删除元素ConcurrentModificationException异常。freeswitch用户整合(使用mysql数据库的用户表)下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=