I'm trying to get initialized my DateTimepicker with multiple Dates. I can initalized with a specific date but not with the multiple option.
var selectedDates = ["12/1/2019","11/1/2019"];
$(function () {
$('#holidayPicker').datetimepicker({
format: 'L',
allowMultidate: true,
multidateSeparator: ' ',
minDate: "<?php echo $startDate->format('Y-m-d');?>",
maxDate: "<?php echo $endDate->format('Y-m-d');?>",
// setDate: [new Date(2019, 0, 4),new Date(2019, 0, 5)]
useCurrent: false,
//date: new Date(2019, 0, 4),
setDate: selectedDates,
});
});
What i have already tried:
- with setDate an a array of Dates and Strings
- with date and multiple Strings or multiple Dates as Strings
- directly over the value attribut of the input field
Does someone has an idea?