Fix first day locale

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This commit is contained in:
John Molakvoæ 2021-12-09 09:07:32 +01:00 committed by nextcloud-command
parent 9e4e1c3dd3
commit 1e77ba0e7a
5 changed files with 8 additions and 23 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -100,7 +100,6 @@
}"
:class="{ error: errors.expireDate}"
:disabled="saving"
:first-day-of-week="firstDay"
:lang="lang"
:value="share.expireDate"
value-type="format"

View file

@ -105,7 +105,7 @@
}"
class="share-link-expire-date"
:disabled="saving"
:first-day-of-week="firstDay"
:lang="lang"
icon=""
type="date"
@ -251,7 +251,6 @@
class="share-link-expire-date"
:class="{ error: errors.expireDate}"
:disabled="saving"
:first-day-of-week="firstDay"
:lang="lang"
:value="share.expireDate"
value-type="format"

View file

@ -110,19 +110,6 @@ export default {
return moment().add(1, 'days')
},
/**
* Datepicker lang values
* https://github.com/nextcloud/nextcloud-vue/pull/146
* TODO: have this in vue-components
*
* @returns {int}
*/
firstDay() {
return window.firstDay
? window.firstDay
: 0 // sunday as default
},
// Datepicker language
lang() {
const weekdaysShort = window.dayNamesShort
@ -131,16 +118,16 @@ export default {
const monthsShort = window.monthNamesShort
? window.monthNamesShort // provided by nextcloud
: ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.']
const firstDayOfWeek = window.firstDay ? window.firstDay : 0
return {
formatLocale: {
firstDayOfWeek,
monthsShort,
weekdaysMin: weekdaysShort,
weekdaysShort,
monthsShort,
},
placeholder: {
date: t('files_sharing', 'Select Date'),
},
monthFormat: 'MMM',
}
},