Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m21s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m21s
This commit is contained in:
commit
814c17d4c9
1 changed files with 9 additions and 1 deletions
|
|
@ -1252,7 +1252,15 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
|
||||
// กรณีมีเฉพาะ date
|
||||
function convertDateToAPI(date: Date | null) {
|
||||
return date ? format(date, "yyyy-MM-dd") : null;
|
||||
if (!date) return null;
|
||||
|
||||
const parsedDate = new Date(date);
|
||||
|
||||
if (parsedDate) {
|
||||
return format(parsedDate, "yyyy-MM-dd");
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// กรณี datetime
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue