I am trying to select multiple dates in Boostrap-Datepicker.
I installed the datepicker as such, just fine.
$('#datepicker2').datepicker();
Now I want to select some dates in the calendar:
$('#datepicker2').datepicker('setDate', [new Date(2014, 2, 5),new Date(2014, 3, 5)]);
This does not work. Errors are not logged, but no dates are selected.
EDIT: The datepicker version that I used had a multi-page problem, I used the previous version and it works - maybe the version problem
This works fine, though:
$('#datepicker2').datepicker('setDate', new Date(2014, 2, 5));
source
share