[Update] Fix date picker component

This commit is contained in:
Baghaztra 2025-10-24 05:33:44 +07:00
parent 9ccc26455e
commit 28a8c1e63d

View File

@ -105,7 +105,14 @@ const tempStartDate = ref('')
const tempEndDate = ref('')
const errorMessage = ref('')
const maxDate = computed(() => new Date().toISOString().split('T')[0])
const maxDate = computed(() => {
const today = new Date()
const year = today.getFullYear()
const month = String(today.getMonth() + 1).padStart(2, '0')
const day = String(today.getDate()).padStart(2, '0')
return `${year}-${month}-${day}`
})
const displayText = computed(() => {
if (props.modelValue.start && props.modelValue.end) {