fix: Show tooltip for readable date

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-11-08 12:58:29 +01:00
parent f8f81af3f8
commit 30842fa969
2 changed files with 37 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ import { defineComponent } from 'vue'
import { NcActionButton, NcActions, NcDatetimePicker } from '@nextcloud/vue' import { NcActionButton, NcActions, NcDatetimePicker } from '@nextcloud/vue'
import { getDayNamesMin, getFirstDay, getMonthNamesShort } from '@nextcloud/l10n' import { getDayNamesMin, getFirstDay, getMonthNamesShort } from '@nextcloud/l10n'
import Calendar from 'vue-material-design-icons/Calendar.vue' import Calendar from 'vue-material-design-icons/Calendar.vue'
import readableDate from '../../mixins/readableDate.js'
export default defineComponent({ export default defineComponent({
name: 'DueDateSelector', name: 'DueDateSelector',
@@ -38,6 +39,9 @@ export default defineComponent({
NcActionButton, NcActionButton,
NcDatetimePicker, NcDatetimePicker,
}, },
mixins: [
readableDate,
],
props: { props: {
card: { card: {
type: Object, type: Object,

View File

@@ -0,0 +1,33 @@
/*
* @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
import moment from '@nextcloud/moment'
export default {
computed: {
formatReadableDate() {
return (timestamp) => {
return moment(timestamp).format('lll')
}
},
},
}