From 301aec9ed6d843a03bfc088df02721d27397e511 Mon Sep 17 00:00:00 2001 From: Favour Olayinka Date: Wed, 1 May 2024 11:39:46 +0100 Subject: [PATCH] fix data limit bug (#392) Co-authored-by: Julien Nahum --- client/components/forms/DateInput.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/components/forms/DateInput.vue b/client/components/forms/DateInput.vue index 43ec951f..4dd7dd66 100644 --- a/client/components/forms/DateInput.vue +++ b/client/components/forms/DateInput.vue @@ -93,7 +93,7 @@ import InputWrapper from './components/InputWrapper.vue' import { getCurrentInstance } from 'vue' import { DatePicker } from 'v-calendar' import 'v-calendar/dist/style.css' -import { format } from 'date-fns' +import { format, startOfDay, endOfDay } from 'date-fns' import { tailwindcssPaletteGenerator } from '~/lib/colors.js' const props = defineProps({ @@ -145,13 +145,13 @@ const inputClasses = computed(() => { const minDate = computed(() => { if (props.disablePastDates) { - return new Date() + return startOfDay(new Date()) } return undefined }) const maxDate = computed(() => { if (props.disableFutureDates) { - return new Date() + return endOfDay(new Date()) } return undefined })