How to set a default date in Bootstrap Datepicker?
I want to set a date : 24/12/2006
When I open datepicker it should show me this date select on calender.
If you want to make the change global, look for the following in bootstrap-datepicker.js:
function UTCToday(){
var today = new Date();
return UTCDate(today.getFullYear(), today.getMonth(), today.getDate());
and hard code in your date, for example:
function UTCToday(){
var today = new Date();
return UTCDate(2006, 00, 01);
Which will open on 1 January 2006. Note that for some reason January is '00' rather than '01'.