Merge pull request #2282 from nextcloud/bugfix/noid/duedate

This commit is contained in:
Julius Härtl
2020-09-14 12:10:34 +02:00
committed by GitHub

View File

@@ -117,6 +117,7 @@
type="datetime" type="datetime"
:minute-step="5" :minute-step="5"
:show-second="false" :show-second="false"
:lang="lang"
:format="format" :format="format"
:disabled="saving || !canEdit" :disabled="saving || !canEdit"
confirm /> confirm />
@@ -219,7 +220,12 @@ import { formatFileSize } from '@nextcloud/files'
import relativeDate from '../../mixins/relativeDate' import relativeDate from '../../mixins/relativeDate'
import AttachmentList from './AttachmentList' import AttachmentList from './AttachmentList'
import { generateUrl } from '@nextcloud/router' import { generateUrl } from '@nextcloud/router'
import { getLocale } from '@nextcloud/l10n' import {
getLocale,
getDayNamesMin,
getFirstDay,
getMonthNamesShort,
} from '@nextcloud/l10n'
import moment from '@nextcloud/moment' import moment from '@nextcloud/moment'
const markdownIt = new MarkdownIt({ const markdownIt = new MarkdownIt({
@@ -278,6 +284,16 @@ export default {
hasActivity: capabilities && capabilities.activity, hasActivity: capabilities && capabilities.activity,
hasComments: !!OC.appswebroots['comments'], hasComments: !!OC.appswebroots['comments'],
modalShow: false, modalShow: false,
lang: {
days: getDayNamesMin(),
months: getMonthNamesShort(),
formatLocale: {
firstDayOfWeek: getFirstDay() === 0 ? 7 : getFirstDay(),
},
placeholder: {
date: t('deck', 'Select Date'),
},
},
format: { format: {
stringify: this.stringify, stringify: this.stringify,
parse: this.parse, parse: this.parse,
@@ -513,7 +529,7 @@ export default {
return moment(date).locale(this.locale).format('LLL') return moment(date).locale(this.locale).format('LLL')
}, },
parse(value) { parse(value) {
return moment(value, 'LLL', this.locale).toDate() return moment(value).toDate()
}, },
showModal() { showModal() {
this.$store.dispatch('setCardDetailsInModal', true) this.$store.dispatch('setCardDetailsInModal', true)