[Ctrl+A 全選 注:如需引入外部Js需刷新才能執(zhí)行]
復(fù)制代碼 代碼如下:
// 日期
$('.date').datepicker({
changeYear: true,
changeMonth: true,
minDate:null,
maxDate:null,
onClose: function(selectedDate) {
$('.gap-date').datepicker('option','minDate', '+1m');
}
});
// 日期范圍
$('.gap-date').datepicker({
changeYear: true,
changeMonth: true,
maxDate:null,
onClose: function(selectedDate) {
var y, m, d;
var arr = selectedDate.split('-');
y = arr[0];
m = arr[1] - 7;
d = arr[2];
$('.date').datepicker('option','maxDate', new Date(y, m, d));
}
});
新聞熱點(diǎn)
疑難解答
圖片精選