Skip to content

Commit 74094d0

Browse files
committed
date-pickerをローカライズ
1 parent a746588 commit 74094d0

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/components/EditLessonScreenInner1.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
:return-value.sync="tempFormData.date"
77
width="290px"
88
>
9-
<v-date-picker v-model="tempFormData.date">
9+
<v-date-picker
10+
v-model="tempFormData.date"
11+
:locale="$root.$i18n.locale"
12+
:day-format="(date) => $dayjs(date).format('D')"
13+
>
1014
<v-spacer />
1115
<v-btn text color="primary" @click="datePickerOpen = false">
1216
{{ $t('common.general.buttons.cancel') }}

src/layouts/classes.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
<v-dialog v-model="openCalenderDialog" max-width="320px">
44
<v-date-picker
55
v-model="date"
6-
locale="ja"
76
first-day-of-week="1"
87
width="100%"
98
class="mb-4"
9+
:locale="$root.$i18n.locale"
10+
:day-format="(date) => $dayjs(date).format('D')"
1011
@input="openCalenderDialog = false"
1112
/>
1213
<base-action-button
@@ -133,8 +134,8 @@ export default Vue.extend({
133134
get() {
134135
return this.$dayjs(vxm.app.currentDate).format('YYYY-MM-DD')
135136
},
136-
set(newValue: string) {
137-
vxm.app.setDate(newValue)
137+
set(newValue: Date) {
138+
vxm.app.setDate((this as any).$dayjs(newValue).toDate())
138139
},
139140
},
140141
},

src/layouts/protected.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
<v-dialog v-model="openCalenderDialog" max-width="320px">
44
<v-date-picker
55
v-model="date"
6-
locale="ja"
76
first-day-of-week="1"
87
width="100%"
98
class="mb-4"
9+
:locale="$root.$i18n.locale"
10+
:day-format="(date) => $dayjs(date).format('D')"
1011
@input="openCalenderDialog = false"
1112
/>
1213
<base-action-button
@@ -132,8 +133,8 @@ export default Vue.extend({
132133
get() {
133134
return this.$dayjs(vxm.app.currentDate).format('YYYY-MM-DD')
134135
},
135-
set(newValue: string) {
136-
vxm.app.setDate(newValue)
136+
set(newValue: Date) {
137+
vxm.app.setDate((this as any).$dayjs(newValue).toDate())
137138
},
138139
},
139140
classData() {

0 commit comments

Comments
 (0)