tempusdominus / bootstrap-3

Tempus Dominus Bootstrap 3
https://getdatepicker.com/5-3/
MIT License
71 stars 23 forks source link

Unable to update datetime in datetimepicker after setting mindate #125

Open rajausman opened 5 years ago

rajausman commented 5 years ago

I have following Code: // intialization $('#datetimepicker2').datetimepicker({ minDate: moment().millisecond(0).second(0).minute(0).hour(0), format: 'YYYY/MM/DD HH:mm A',

});

I have use minDate = 0 ,minDate=new Date(), minDate=moment() but didn't work :( // update case when trigger Edit Button function ChangeFormat(dates) {

var newDate = moment.utc(dates).local().format();
newDate = moment(newDate).format('YYYY/MM/DD  HH:mm A');
return newDate;

}; var date = ChangeFormat(UTCDateTime);

$('#datetimepicker2').data("DateTimePicker").date(date);

$("#updateSchedulemodal").modal('show');