Show date in the entry time format
This commit is contained in:
parent
03107fb305
commit
cbd520e999
1 changed files with 8 additions and 8 deletions
|
|
@ -149,13 +149,13 @@ function getDateFmt(date: Date | null): string {
|
|||
return "";
|
||||
}
|
||||
|
||||
const hour = date.getHours();
|
||||
const minute = date.getMinutes();
|
||||
const year = date.getFullYear();
|
||||
const month = `0${date.getMonth()}`.slice(-2);
|
||||
const date_str = date.getDate();
|
||||
const hour = `0${date.getHours()}`.slice(-2);
|
||||
const minute = `0${date.getMinutes()}`.slice(-2);
|
||||
|
||||
const hh = `0${hour.toString()}`.slice(-2);
|
||||
const mm = `0${minute.toString()}`.slice(-2);
|
||||
|
||||
return `${hh}:${mm}`;
|
||||
return `${hour}:${minute} ${date_str}/${month}/${year}`;
|
||||
}
|
||||
|
||||
async function save(event: DataTableRowEditSaveEvent) {
|
||||
|
|
@ -265,7 +265,7 @@ function projectTitleFormat(project: Project, titleLimit: number): string {
|
|||
{{ getDateFmt(slotProps.data.start) }}
|
||||
</template>
|
||||
<template #editor="{ data, field }">
|
||||
<DatePicker v-model="data[field]" timeOnly style="min-width: 100px;" />
|
||||
<DatePicker v-model="data[field]" showTime style="min-width: 100px;" />
|
||||
</template>
|
||||
</Column>
|
||||
<Column field="end" header="End">
|
||||
|
|
@ -273,7 +273,7 @@ function projectTitleFormat(project: Project, titleLimit: number): string {
|
|||
{{ getDateFmt(slotProps.data.end) }}
|
||||
</template>
|
||||
<template #editor="{ data, field }">
|
||||
<DatePicker v-if="data[field]" v-model="data[field]" timeOnly style="min-width: 100px;" />
|
||||
<DatePicker v-if="data[field]" v-model="data[field]" showTime style="min-width: 100px;" />
|
||||
</template>
|
||||
</Column>
|
||||
<Column field="description" header="Description">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue