bootstrap datepicker today as default
Set after Init
$('#dp-ex-3').datepicker({ autoclose: true, language: 'es' });
$('#dp-ex-3').datepicker('update', new Date());
This example is working.
I used this code
$('#datePicker').datepicker({
format:'mm/dd/yyyy',
}).datepicker("setDate",'now');
This should work:
$("#datepicker").datepicker("setDate", new Date());
And for autoclose (fiddle):
$('#datepicker').datepicker({
"setDate": new Date(),
"autoclose": true
});
jQuery > datepicker API