Skip to content

Commit b79d73e

Browse files
skjnldsvbackportbot[bot]
authored andcommitted
Fix first day locale
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
1 parent 9e4e1c3 commit b79d73e

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

apps/files_sharing/src/components/SharingEntry.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@
100100
}"
101101
:class="{ error: errors.expireDate}"
102102
:disabled="saving"
103-
:first-day-of-week="firstDay"
104103
:lang="lang"
105104
:value="share.expireDate"
106105
value-type="format"

apps/files_sharing/src/components/SharingEntryLink.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
}"
106106
class="share-link-expire-date"
107107
:disabled="saving"
108-
:first-day-of-week="firstDay"
108+
109109
:lang="lang"
110110
icon=""
111111
type="date"
@@ -251,7 +251,6 @@
251251
class="share-link-expire-date"
252252
:class="{ error: errors.expireDate}"
253253
:disabled="saving"
254-
:first-day-of-week="firstDay"
255254
:lang="lang"
256255
:value="share.expireDate"
257256
value-type="format"

apps/files_sharing/src/mixins/SharesMixin.js

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,6 @@ export default {
110110
return moment().add(1, 'days')
111111
},
112112

113-
/**
114-
* Datepicker lang values
115-
* https://github.com/nextcloud/nextcloud-vue/pull/146
116-
* TODO: have this in vue-components
117-
*
118-
* @returns {int}
119-
*/
120-
firstDay() {
121-
return window.firstDay
122-
? window.firstDay
123-
: 0 // sunday as default
124-
},
125-
126113
// Datepicker language
127114
lang() {
128115
const weekdaysShort = window.dayNamesShort
@@ -131,16 +118,16 @@ export default {
131118
const monthsShort = window.monthNamesShort
132119
? window.monthNamesShort // provided by nextcloud
133120
: ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.']
121+
const firstDayOfWeek = window.firstDay ? window.firstDay : 0
134122

135123
return {
136124
formatLocale: {
125+
firstDayOfWeek,
126+
monthsShort,
137127
weekdaysMin: weekdaysShort,
138128
weekdaysShort,
139-
monthsShort,
140-
},
141-
placeholder: {
142-
date: t('files_sharing', 'Select Date'),
143129
},
130+
monthFormat: 'MMM',
144131
}
145132
},
146133

0 commit comments

Comments
 (0)