📅  最后修改于: 2022-03-11 15:03:01.642000             🧑  作者: Mango
// [SOLVED] var date = new Date(year + 1, month, day);
$('#membership_start').on('dp.change', function(e){
console.log(e.date);
var year = new Date(e.date).getFullYear();
var month = new Date(e.date).getMonth();
var day = new Date(e.date).getDate();
var date = new Date(year + 1, month, day);
$('#membership_end').data("DateTimePicker").date(date);
});