update vue-datepicker, and make the picker show the calendar view every time opening

This commit is contained in:
MaysWind
2023-06-23 15:48:47 +08:00
parent d59a10f718
commit bb6345ccfa
5 changed files with 12 additions and 6 deletions
@@ -15,6 +15,7 @@
</p>
<slot></slot>
<vue-date-picker range inline enable-seconds auto-apply
ref="datetimepicker"
month-name-format="long"
six-weeks="center"
class="justify-content-center margin-bottom"
@@ -159,6 +160,8 @@ export default {
if (this.maxTime) {
this.dateRange[1] = getLocalDatetimeFromUnixTime(getDummyUnixTimeForLocalUsage(this.maxTime, getTimezoneOffsetMinutes(), getBrowserTimezoneOffsetMinutes()));
}
this.$refs.datetimepicker.switchView('calendar');
},
onSheetClosed() {
this.$emit('update:show', false);
@@ -12,6 +12,7 @@
</f7-toolbar>
<f7-page-content>
<vue-date-picker inline enable-seconds auto-apply
ref="datetimepicker"
month-name-format="long"
six-weeks="center"
class="justify-content-center"
@@ -91,6 +92,8 @@ export default {
if (this.modelValue) {
this.dateTime = getLocalDatetimeFromUnixTime(this.modelValue)
}
this.$refs.datetimepicker.switchView('calendar');
},
onSheetClosed() {
this.$emit('update:show', false);