更新时间:2023-01-30 14:35:29
实际上,27/11/2013代表的是当前日期。除非您在 changeDate
事件中写下,否则不会更新
Actually, what that 27/11/2013 represents is the current Date. Which will not get updated unless you write it on changeDate
event.
所以你必须像
开始日期
, changeDate
事件。现在将此更新为结束日期
使用 update
方法
start date
, with changeDate
event.Now update this to end Date
using update
method
$('#end')datepicker ',toDate)
;
最后,你的代码将像
$('#start').datepicker({}).on('changeDate', function (ev) {
var toDate = ev.date;
toDate.setDate(toDate.getDate() + 1);
$('#end').datepicker('update', toDate);
});
$('#end').datepicker({});