fix: updated date format to support dayjs
This commit is contained in:
parent
641d66bb14
commit
d2f99bae75
@ -56,7 +56,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center flex-wrap gap-2">
|
||||
<Badge :label="formatDate(activity.creation, 'MMM d, EEEE')">
|
||||
<Badge :label="formatDate(activity.creation, 'MMM D, dddd')">
|
||||
<template #prefix>
|
||||
<CalendarIcon class="size-3" />
|
||||
</template>
|
||||
|
||||
@ -19,11 +19,11 @@
|
||||
</div>
|
||||
<div v-if="task.due_date">
|
||||
<Tooltip
|
||||
:text="formatDate(task.due_date, 'EEE, MMM d, yyyy | hh:mm a')"
|
||||
:text="formatDate(task.due_date, 'ddd, MMM D, YYYY | hh:mm a')"
|
||||
>
|
||||
<div class="flex gap-2">
|
||||
<CalendarIcon />
|
||||
<div>{{ formatDate(task.due_date, 'd MMM, hh:mm a') }}</div>
|
||||
<div>{{ formatDate(task.due_date, 'D MMM, hh:mm a') }}</div>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
@ -127,7 +127,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div class="-mb-1 flex shrink-0 items-end gap-1 text-ink-gray-5">
|
||||
<Tooltip :text="formatDate(whatsapp.creation, 'EEE, MMM d, yyyy')">
|
||||
<Tooltip :text="formatDate(whatsapp.creation, 'ddd, MMM D, YYYY')">
|
||||
<div class="text-2xs">
|
||||
{{ formatDate(whatsapp.creation, 'hh:mm a') }}
|
||||
</div>
|
||||
|
||||
@ -242,7 +242,7 @@ function captureImage() {
|
||||
}
|
||||
|
||||
function uploadViaCamera() {
|
||||
const nowDatetime = formatDate(new Date(), 'yyyy_MM_dd_HH_mm_ss')
|
||||
const nowDatetime = formatDate(new Date(), 'YYYY_MM_DD_HH_mm_ss')
|
||||
let filename = `capture_${nowDatetime}.png`
|
||||
urlToFile(cameraImage.value, filename, 'image/png').then((file) => {
|
||||
addFiles([file])
|
||||
|
||||
@ -40,12 +40,12 @@
|
||||
>
|
||||
<div v-if="column.key === 'due_date'">
|
||||
<Tooltip
|
||||
:text="item && formatDate(item, 'EEE, MMM d, yyyy | hh:mm a')"
|
||||
:text="item && formatDate(item, 'ddd, MMM D, YYYY | hh:mm a')"
|
||||
>
|
||||
<div class="flex items-center gap-2 truncate text-base">
|
||||
<div><CalendarIcon /></div>
|
||||
<div v-if="item" class="truncate">
|
||||
{{ formatDate(item, 'd MMM, hh:mm a') }}
|
||||
{{ formatDate(item, 'D MMM, hh:mm a') }}
|
||||
</div>
|
||||
</div>
|
||||
</Tooltip>
|
||||
|
||||
@ -266,7 +266,7 @@ function parseRows(rows, columns = []) {
|
||||
if (
|
||||
fieldType &&
|
||||
['Date', 'Datetime'].includes(fieldType) &&
|
||||
!['modified', 'creation'].includes(row)
|
||||
!['modified', 'creation', 'due_date'].includes(row)
|
||||
) {
|
||||
_rows[row] = formatDate(task[row], '', true, fieldType == 'Datetime')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user