mirror of
https://github.com/nextcloud/server.git
synced 2026-04-26 16:48:59 -04:00
Merge pull request #30191 from nextcloud/backport/30157/stable22
This commit is contained in:
commit
e9d52bba9f
5 changed files with 19 additions and 27 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -100,7 +100,6 @@
|
|||
}"
|
||||
:class="{ error: errors.expireDate}"
|
||||
:disabled="saving"
|
||||
:first-day-of-week="firstDay"
|
||||
:lang="lang"
|
||||
:value="share.expireDate"
|
||||
value-type="format"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -110,30 +110,24 @@ 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() {
|
||||
// fallback to default in case of unavailable data
|
||||
const weekdaysShort = window.dayNamesShort
|
||||
? window.dayNamesShort // provided by nextcloud
|
||||
: ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.']
|
||||
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 {
|
||||
days: window.dayNamesShort
|
||||
? window.dayNamesShort // provided by nextcloud
|
||||
: ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'],
|
||||
months: window.monthNamesShort
|
||||
? window.monthNamesShort // provided by nextcloud
|
||||
: ['Jan.', 'Feb.', 'Mar.', 'Apr.', 'May.', 'Jun.', 'Jul.', 'Aug.', 'Sep.', 'Oct.', 'Nov.', 'Dec.'],
|
||||
placeholder: {
|
||||
date: 'Select Date', // TODO: Translate
|
||||
formatLocale: {
|
||||
firstDayOfWeek,
|
||||
monthsShort,
|
||||
weekdaysMin: weekdaysShort,
|
||||
weekdaysShort,
|
||||
},
|
||||
monthFormat: 'MMM',
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue