try to change calender format

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>

try to change calender format

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2020-05-12 11:05:37 +02:00
committed by Julius Härtl
parent 9b8eb6d354
commit 50679c7c91

View File

@@ -104,6 +104,9 @@
<DatetimePicker v-model="duedate"
:placeholder="t('deck', 'Set a due date')"
type="datetime"
:minute-step="5"
:show-second="false"
:format="format"
:disabled="saving || !canEdit"
confirm />
<Actions v-if="canEdit">
@@ -203,6 +206,8 @@ 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 moment from '@nextcloud/moment'
const markdownIt = new MarkdownIt({
linkify: true,
@@ -242,6 +247,7 @@ export default {
addedLabelToCard: null,
copiedCard: null,
allLabels: null,
locale: getLocale(),
saving: false,
markdownIt: null,
@@ -260,6 +266,10 @@ export default {
hasActivity: capabilities && capabilities.activity,
hasComments: !!OC.appswebroots['comments'],
modalShow: false,
format: {
stringify: this.stringify,
parse: this.parse,
},
}
},
computed: {
@@ -485,6 +495,12 @@ export default {
}
this.$store.dispatch('removeLabel', data)
},
stringify(date) {
return moment(date).locale(this.locale).format('LLL')
},
parse(value) {
return moment(value, 'LLL', this.locale).toDate()
},
},
}
</script>