fix: do not try to fix date values of type string

This commit is contained in:
Veronika Fehérvíziová
2025-10-31 23:32:28 +01:00
parent d49133a377
commit 65bdbbe512

View File

@@ -91,7 +91,11 @@ const form = ref({
const user = useSanctumUser<User>();
function dateTimeFixup(datetime: Date) {
function dateTimeFixup(datetime: Date|string) {
if(typeof datetime === 'string') {
return datetime;
}
const year = datetime.getFullYear()
const month = String(datetime.getMonth() + 1).padStart(2, '0')
const day = String(datetime.getDate()).padStart(2, '0')