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