1.年月日时间控件
(1)html页面
<label>开始时间</label>
<input class="date-picker" id="beginTime" name="beginTime" type="text" data-date-format="yyyy-mm-dd"/>
<label>结束时间</label>
<input class="date-picker" id="endTime" name="endTime" type="text" data-date-format="yyyy-mm-dd"/
(2)JS
在jquery初始化函数中加入如下代码
$('.input-daterange').datepicker({autoclose:true,format: 'yyyy-mm-dd'});
$('.date-picker').datepicker({
autoclose : true,
todayHighlight : true
})
// show datepicker when clicking on the icon
.next().on(ace.click_event, function() {
$(this).prev().focus();
});
2.到时分秒的时间控件
(1)html页面
$('.input-daterange').datepicker({autoclose:true,format: 'yyyy-mm-dd'});
$('.date-picker').datepicker({
autoclose : true,
todayHighlight : true
})
// show datepicker when clicking on the icon
.next().on(ace.click_event, function() {
$(this).prev().focus();
});
(2)JS
$('.input-daterange').datepicker({autoclose:true,format: 'yyyy-mm-dd'});
$('.date-picker').datepicker({
autoclose : true,
todayHighlight : true
})
// show datepicker when clicking on the icon
.next().on(ace.click_event, function() {
$(this).prev().focus();
});