Set initial month of datepicker to first selectable date
This commit is contained in:
@@ -149,10 +149,13 @@
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.availableDates = json;
|
this.availableDates = json;
|
||||||
const enabledDates = [];
|
const enabledDates = [];
|
||||||
for (let entry of this.availableDates) {
|
if (json.length) {
|
||||||
enabledDates.push(entry.date);
|
for (let entry of this.availableDates) {
|
||||||
|
enabledDates.push(entry.date);
|
||||||
|
}
|
||||||
|
this.picker.set('enable', enabledDates);
|
||||||
|
this.picker.jumpToDate(enabledDates[0]);
|
||||||
}
|
}
|
||||||
this.picker.set('enable', enabledDates);
|
|
||||||
}, 'json');
|
}, 'json');
|
||||||
},
|
},
|
||||||
fetchAvailableRooms () {
|
fetchAvailableRooms () {
|
||||||
|
|||||||
Reference in New Issue
Block a user