feat: enable updating gottesdienste

This commit is contained in:
2025-03-21 21:18:25 +01:00
parent 4d92b911b7
commit 3caf5a0c13
5 changed files with 73 additions and 27 deletions
+5 -3
View File
@@ -7,7 +7,7 @@ const props = withDefaults(defineProps<{
label?: string,
disabled?: boolean,
type?: string,
dateFormat?: "string" | "number",
dateFormat?: "string" | "number" | "date",
focus?: boolean
}>(), {
dateFormat: "string"
@@ -45,10 +45,12 @@ function leading(val) {
function getValue(){
if(props.type == "date" && props.dateFormat == "number") {
console.log(props.value)
const date = new Date(props.value)
return leading(date.getFullYear()) + "-" + zeros(date.getMonth() + 1) + "-" + zeros(date.getDate())
}else{
} if(props.type == "date" && props.dateFormat == "date") {
const date = new Date(props.value)
return leading(date.getFullYear()) + "-" + zeros(date.getMonth() + 1) + "-" + zeros(date.getDate())
} else {
return props.value
}
}