Reputation: 742
My today Date is 16-1-2014
and I set default date is 17-01-2014
but this is not working
$('#datetimepicker').datetimepicker({
startDate: new Date(),
autoclose: true,
todayBtn: true,
todayHighlight: false,
initialDate: new Date(2014, 00, 17),
//update: new Date(2014, 00, 17),
// onRender: function(ev) {
// console.log(ev.date.valueOf());
// },
format: 'dd/MM/yyyy hh:mm:ss',
language: 'en'
})
output show on calendar
I am using below library bootstrap-datetimepicker
Upvotes: 5
Views: 2107
Reputation: 1724
Looking at the code it looks like the initialDate
is not considered at all if your input element has a value attribute.
So if you want initiaDate
to be used, make sure your input doesn't have a value (i.e. value=""
or no value at all).
Upvotes: 1