Bootstrap Datetimepicker Set Date


Answer :

As per documentation you can use string, Date, moment, null, string and Date examples are below. Note default picker format.

$('#datetimepicker1').data("DateTimePicker").date(new Date()) 

or

$('#datetimepicker1').data("DateTimePicker").date('1/11/2016 12:23:12') 

Sure, i'm real Necromancer, but i got same problem and .date() function does not help for me. But, i found this:

$('#datetimepicker1').data("DateTimePicker").options({ defaultDate: newdate}); // newdate - could be Date, Moment or ISO string 

Comments

Popular posts from this blog

Chemistry - Bond Angles In NH3 And NCl3

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Change The Font Size Of Visual Studio Solution Explorer