diff options
author | René Gieling <github@dartcafe.de> | 2021-05-31 18:23:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-31 18:23:50 +0300 |
commit | 8e327b0a0afe5ecba25c6e6bc121f47c9570a35a (patch) | |
tree | 2fd1f4edb91f4541d78911baf3da7a140343d410 /src | |
parent | b2a5c6f0e39c3385338d27ec7f7bce1deea5cdbc (diff) | |
parent | a0b39d525a0464100b31a652a9f76e2ef186e35b (diff) |
Merge pull request #1674 from nextcloud/fix/date-picker-locale
fix firstDayOfWeek #1560
Diffstat (limited to 'src')
-rw-r--r-- | src/js/components/Configuration/ConfigProposals.vue | 9 | ||||
-rw-r--r-- | src/js/components/Options/OptionsDateAdd.vue | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/js/components/Configuration/ConfigProposals.vue b/src/js/components/Configuration/ConfigProposals.vue index 284ba1ee..22e68234 100644 --- a/src/js/components/Configuration/ConfigProposals.vue +++ b/src/js/components/Configuration/ConfigProposals.vue @@ -95,6 +95,15 @@ export default { }, }, + firstDOW() { + // vue2-datepicker needs 7 for sunday + if (moment.localeData()._week.dow === 0) { + return 7 + } + return moment.localeData()._week.dow + + }, + expirationDatePicker() { return { editable: true, diff --git a/src/js/components/Options/OptionsDateAdd.vue b/src/js/components/Options/OptionsDateAdd.vue index 33a39d38..68d71425 100644 --- a/src/js/components/Options/OptionsDateAdd.vue +++ b/src/js/components/Options/OptionsDateAdd.vue @@ -164,6 +164,15 @@ export default { }, + firstDOW() { + // vue2-datepicker needs 7 for sunday + if (moment.localeData()._week.dow === 0) { + return 7 + } + return moment.localeData()._week.dow + + }, + pickerOptions() { return { appendToBody: true, |