I’m trying to setup the air-datepicker for two month view on desktop and one month view on mobile but it’s not succeeded, any recommendation how to achieve that?
// Initialize the Datepicker only once
if (!pickerInitialized) {
picker = new AirDatepicker('#datepicker-input', {
inline: true, // Display inline
range: true, // Enable range selection
multipleDatesSeparator: ' - ', // Separator for date range
showOtherMonths: true, // Show adjacent month days
numberOfMonths: 2, // Show two months at the same time
locale: englishLocale, // Set to English locale explicitly
minDate: new Date(), // Disable past dates,
onSelect({date, formattedDate}) {
// Get the start and end date of the range
selectedStartDate = date[0];
selectedEndDate = date[1];