diff --git a/resources/js/components/DatePicker.vue b/resources/js/components/DatePicker.vue index 5b0d7bd..fdfcdd5 100644 --- a/resources/js/components/DatePicker.vue +++ b/resources/js/components/DatePicker.vue @@ -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) {