Clear (set back to default view)
clear() {
this.panelType = 'date';
this.$emit('input', this.range ? ['', ''] : '');
}
not done yet: reset to selected:
If you already picked a date or range and you open the datepicker and change the year/month and close it without to adopt that date and reopen it date and month still have the last selected values, it should be set back to init state on panelType = 'date' and the list should be the one where your date is visible
Just added these lines of code:
case 'de': return {1: 'Jan', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Okt', 11: 'Nov', 12: 'Dez'}[item];
Navigation over border of year:
prevMonthPreview() { if (this.tmpMonth === 0) { this.tmpMonth = 11; this.tmpYear = this.tmpYear - 1; } else { this.tmpMonth = this.tmpMonth - 1; } }, nextMonthPreview() { if (this.tmpMonth === 11) { this.tmpMonth = 0; this.tmpYear = this.tmpYear + 1; } else { this.tmpMonth = this.tmpMonth + 1; } }
Clear (set back to default view) clear() { this.panelType = 'date'; this.$emit('input', this.range ? ['', ''] : ''); }
not done yet: reset to selected: If you already picked a date or range and you open the datepicker and change the year/month and close it without to adopt that date and reopen it date and month still have the last selected values, it should be set back to init state on panelType = 'date' and the list should be the one where your date is visible
Best + thx for your work! PJ