From d3e9c2d50ccefb24b59ccd712bc344fa857d95b2 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期二, 19 八月 2025 17:15:48 +0800 Subject: [PATCH] fix: bug --- packages/components/src/Input/ChooseInputWithDatePicker.vue | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/components/src/Input/ChooseInputWithDatePicker.vue b/packages/components/src/Input/ChooseInputWithDatePicker.vue index ca4897c..a2d8450 100644 --- a/packages/components/src/Input/ChooseInputWithDatePicker.vue +++ b/packages/components/src/Input/ChooseInputWithDatePicker.vue @@ -18,9 +18,12 @@ minDate?: Date; maxDate?: Date; type?: string; + format?: string; }; -const props = withDefaults(defineProps<Props>(), {}); +const props = withDefaults(defineProps<Props>(), { + format: 'YYYY-MM-DD', +}); const emit = defineEmits<{ (e: 'update:modelValue', val: string | number): void; @@ -49,7 +52,7 @@ type: props.type, maxDate: props.maxDate, onConfirm: ({ selectedValue }) => { - emit('update:modelValue', dayjs(selectedValue.join('-')).format('YYYY-MM-DD')); + emit('update:modelValue', dayjs(selectedValue.join('-')).format(props.format)); onClose(); }, minDate: props.minDate, -- Gitblit v1.9.1