From 1da9b7dfd09b539b53694e84c06d2a1ac45dc88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 11 Sep 2020 08:24:33 +0200 Subject: [PATCH] Fix picking up proper duedate locale and language settings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/components/card/CardSidebar.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/components/card/CardSidebar.vue b/src/components/card/CardSidebar.vue index 459f91798..314aad796 100644 --- a/src/components/card/CardSidebar.vue +++ b/src/components/card/CardSidebar.vue @@ -117,6 +117,7 @@ type="datetime" :minute-step="5" :show-second="false" + :lang="lang" :format="format" :disabled="saving || !canEdit" confirm /> @@ -219,7 +220,12 @@ import { formatFileSize } from '@nextcloud/files' import relativeDate from '../../mixins/relativeDate' import AttachmentList from './AttachmentList' import { generateUrl } from '@nextcloud/router' -import { getLocale } from '@nextcloud/l10n' +import { + getLocale, + getDayNamesMin, + getFirstDay, + getMonthNamesShort, +} from '@nextcloud/l10n' import moment from '@nextcloud/moment' const markdownIt = new MarkdownIt({ @@ -278,6 +284,16 @@ export default { hasActivity: capabilities && capabilities.activity, hasComments: !!OC.appswebroots['comments'], modalShow: false, + lang: { + days: getDayNamesMin(), + months: getMonthNamesShort(), + formatLocale: { + firstDayOfWeek: getFirstDay() === 0 ? 7 : getFirstDay(), + }, + placeholder: { + date: t('deck', 'Select Date'), + }, + }, format: { stringify: this.stringify, parse: this.parse,