I am using this datepicker : https://github.com/benitolopez/hotel-datepicker
My datepicker works fine, however, when creating the calendar I would like it to open on a specific month without disabling previous months as long as it is within my startDate and endDate.
I tried changing the startDate and that works, however, it disables all of the months before (saw that in the documentation after the fact). Which is no bueno. I did some googling and found people using a defaultDate for other datepickers but that doesn't seem to do anything. Any help would be appreciated.
var default_date = document.getElementById("start").value;
let datepicker = new HotelDatepicker(document.getElementById(response[0].room + '-datepicker'), {
format: 'MM-DD-YYYY',
infoFormat: 'MM-DD-YYYY',
minNights: 1,
maxNights: 29,
disabledDates: lockedDates,
noCheckInDates: lockedDates,
startDate: moment().add(1, 'days').format('MM-DD-YYYY'),
endDate: maxDay,
defaultDate: default_date,
enableCheckout: true,
autoClose: false,
preventContainerClose: true,
moveBothMonths: true,
selectForward: true,
setValue: function (s, s1, s2) {
var checkin = new Date(s1);
var checkout = new Date(s2);
var checkin_formatted = fecha.format(checkin, 'YYYY-MM-DD');
var checkout_formatted = fecha.format(checkout, 'YYYY-MM-DD');
document.getElementById(response[0].room + '-partialcheckin').value = checkin_formatted;
document.getElementById(response[0].room + '-partialcheckout').value = checkout_formatted;
}