Fix first day locale

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ 2021-12-09 09:07:32 +01:00 committed by Louis Chemineau
parent 7c89c7cce1
commit d2e5fb6a7a
3 changed files with 5 additions and 20 deletions

View file

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

View file

@ -102,7 +102,7 @@
}"
class="share-link-expire-date"
:disabled="saving"
:first-day-of-week="firstDay"
:lang="lang"
icon=""
type="date"
@ -248,7 +248,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

@ -105,19 +105,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
@ -126,16 +113,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',
}
},