feat: add date math for filters #1342
|
@ -57,7 +57,7 @@ const flatPickerConfig = computed(() => ({
|
||||||
inline: true,
|
inline: true,
|
||||||
mode: 'range',
|
mode: 'range',
|
||||||
locale: {
|
locale: {
|
||||||
firstDayOf7Days: weekStart,
|
firstDayOf7Days: weekStart.value,
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
|
@ -97,8 +97,8 @@ export default {
|
||||||
const title = this.showAll
|
const title = this.showAll
|
||||||
konrad marked this conversation as resolved
Outdated
|
|||||||
? this.$t('task.show.titleCurrent')
|
? this.$t('task.show.titleCurrent')
|
||||||
konrad marked this conversation as resolved
Outdated
dpschen
commented
Remove title var and return directly:
Remove title var and return directly:
```js
if (typeof predefinedRange !== 'undefined') {
return t(`input.datepickerRange.ranges.${predefinedRangeKey}`)
} else {
return showAll
? t('task.show.titleCurrent')
: t('task.show.fromuntil', {
from: formatDate(dateFrom, 'PPP'),
until: formatDate(dateTo, 'PPP'),
})
}
konrad
commented
Done. Done.
|
|||||||
: this.$t('task.show.fromuntil', {
|
: this.$t('task.show.fromuntil', {
|
||||||
from: this.formatDateShort(this.dateFrom),
|
from: this.format(this.dateFrom, 'PPP'),
|
||||||
until: this.formatDateShort(this.dateTo)
|
until: this.format(this.dateTo, 'PPP')
|
||||||
})
|
})
|
||||||
|
|
||||||
this.setTitle(title)
|
this.setTitle(title)
|
||||||
|
|
Reference in New Issue
Block a user
Unsure: I think eslint doesn't complain here if you use underscore (
_
) to spread the unused variable.Add
?.[0]
so we return the key, which is what we actually want to use and adjust variable name.Nope, does not seem to have an effect.
Done.
Interesting!