Update dependencies and fix code issues

This commit is contained in:
Eko Haryadi
2024-02-20 18:44:11 +07:00
parent 2758481259
commit a0ccf13466
65 changed files with 3454 additions and 2271 deletions

View File

@ -12,7 +12,31 @@ const formatter = ref({
})
const emit = defineEmits(['update:dateValue'])
const customShortcuts = () => {
return [
{
label: "Last 15 Days",
atClick: () => {
const date = new Date();
return [new Date(date.setDate(date.getDate() + 1)), date];
},
},
{
label: "Last Years",
atClick: () => {
const date = new Date();
return [new Date(date.setFullYear(date.getFullYear() - 1)), new Date()];
},
},
{
label: "Last 3 Years",
atClick: () => {
const date = new Date();
return [new Date(date.setFullYear(date.getFullYear() - 3)), new Date()];
},
},
];
};
watch(dateValue, (newValue) => {
emit('update:dateValue', newValue)
})
@ -24,7 +48,7 @@ watch(dateValue, (newValue) => {
v-model="dateValue"
:formatter="formatter"
separator=" s/d "
:shortcuts="false"
:shortcuts="customShortcuts"
:auto-apply="false"
as-single
use-range