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