// [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);
});
var d = new Date();
var year = d.getFullYear();
var month = d.getMonth();
var day = d.getDate();
var c = new Date(year);
console.log(c);
Run code snippetHide results
// => Wed Dec 31 1969 16:00:02 GMT-0800 (PST)