fix: Show tooltip for readable date
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
33
src/mixins/readableDate.js
Normal file
33
src/mixins/readableDate.js
Normal 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')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user