merge-upstream-5.0.1 #66

Merged
778a69cd merged 80 commits from merge-upstream-5.0.1 into main 2024-12-26 12:55:41 +01:00
Showing only changes of commit 9992286e7e - Show all commits

View file

@ -1,7 +1,7 @@
<template>
<input
type="datetime-local"
class="rounded"
class="rounded invalid:border-red-500"
v-model="component"
:min="computeMin"
@blur="$emit('blur')"
@ -12,8 +12,8 @@ import { computed } from "vue";
const props = withDefaults(
defineProps<{
modelValue: Date;
min?: Date | undefined;
modelValue: Date | null;
min?: Date | null | undefined;
}>(),
{
min: undefined,
@ -30,10 +30,19 @@ const UTCToLocal = (date: Date) => {
const component = computed({
get() {
if (!props.modelValue) {
return null;
}
return UTCToLocal(props.modelValue);
},
set(value) {
emit("update:modelValue", new Date(value));
console.log("value" + value);
if (!value) {
emit("update:modelValue", null);
return;
}
const date = new Date(value);
emit("update:modelValue", date);
},
});