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 "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const hour = date.getHours();
|
const year = date.getFullYear();
|
||||||
const minute = date.getMinutes();
|
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);
|
return `${hour}:${minute} ${date_str}/${month}/${year}`;
|
||||||
const mm = `0${minute.toString()}`.slice(-2);
|
|
||||||
|
|
||||||
return `${hh}:${mm}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function save(event: DataTableRowEditSaveEvent) {
|
async function save(event: DataTableRowEditSaveEvent) {
|
||||||
|
|
@ -265,7 +265,7 @@ function projectTitleFormat(project: Project, titleLimit: number): string {
|
||||||
{{ getDateFmt(slotProps.data.start) }}
|
{{ getDateFmt(slotProps.data.start) }}
|
||||||
</template>
|
</template>
|
||||||
<template #editor="{ data, field }">
|
<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>
|
</template>
|
||||||
</Column>
|
</Column>
|
||||||
<Column field="end" header="End">
|
<Column field="end" header="End">
|
||||||
|
|
@ -273,7 +273,7 @@ function projectTitleFormat(project: Project, titleLimit: number): string {
|
||||||
{{ getDateFmt(slotProps.data.end) }}
|
{{ getDateFmt(slotProps.data.end) }}
|
||||||
</template>
|
</template>
|
||||||
<template #editor="{ data, field }">
|
<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>
|
</template>
|
||||||
</Column>
|
</Column>
|
||||||
<Column field="description" header="Description">
|
<Column field="description" header="Description">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue