replaced date selector with date range selector
This commit is contained in:
parent
e5250ab59e
commit
377a727e7a
|
|
@ -2,7 +2,7 @@
|
|||
<ContentLayout :title="layout.title" :actions="layout.action" @onCreate="onCreate">
|
||||
<template #body>
|
||||
<div class="content-search">
|
||||
<DateSelector id="report-date" v-model="selectedDate" :classValue="`w-full`" :isBS="true" />
|
||||
<DateRange id="date-range" v-model="dateRange" :searchOnLoad="true" />
|
||||
</div>
|
||||
<Tabulator
|
||||
:columns="headerDetails"
|
||||
|
|
@ -45,20 +45,12 @@ const layout = ref({
|
|||
],
|
||||
});
|
||||
|
||||
// const timeFormatter = (cell: any) => {
|
||||
// const timeStr = cell.getValue();
|
||||
// if (timeStr) {
|
||||
// const [hours, minutes] = timeStr.split(":").map(Number);
|
||||
// const date = new Date(0, 0, 0, hours, minutes);
|
||||
// return date.toLocaleTimeString([], {
|
||||
// hour: "numeric",
|
||||
// minute: "2-digit",
|
||||
// hour12: true,
|
||||
// });
|
||||
// } else {
|
||||
// return cell.getValue();
|
||||
// }
|
||||
// };
|
||||
const dateRange = ref({
|
||||
startDate: "",
|
||||
endDate: "",
|
||||
dateType: "today",
|
||||
isBS: true,
|
||||
});
|
||||
|
||||
const selectedDate = ref(BStoAD(new NepaliDate().format("YYYY-MM-DD")));
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<ContentLayout :title="layout.title" :actions="layout.action" @onCreate="onCreate">
|
||||
<template #body>
|
||||
<div class="content-search">
|
||||
<DateSelector id="report-date" v-model="selectedDate" :classValue="`w-full`" :isBS="true" />
|
||||
<DateRange id="date-range" v-model="dateRange" :searchOnLoad="true" />
|
||||
</div>
|
||||
<Tabulator
|
||||
:columns="headerDetails"
|
||||
|
|
@ -45,20 +45,12 @@ const layout = ref({
|
|||
],
|
||||
});
|
||||
|
||||
// const timeFormatter = (cell: any) => {
|
||||
// const timeStr = cell.getValue();
|
||||
// if (timeStr) {
|
||||
// const [hours, minutes] = timeStr.split(":").map(Number);
|
||||
// const date = new Date(0, 0, 0, hours, minutes);
|
||||
// return date.toLocaleTimeString([], {
|
||||
// hour: "numeric",
|
||||
// minute: "2-digit",
|
||||
// hour12: true,
|
||||
// });
|
||||
// } else {
|
||||
// return cell.getValue();
|
||||
// }
|
||||
// };
|
||||
const dateRange = ref({
|
||||
startDate: "",
|
||||
endDate: "",
|
||||
dateType: "today",
|
||||
isBS: true,
|
||||
});
|
||||
|
||||
const selectedDate = ref(BStoAD(new NepaliDate().format("YYYY-MM-DD")));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user