fix data limit bug (#392)
Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
parent
8cca48e419
commit
301aec9ed6
|
|
@ -93,7 +93,7 @@ import InputWrapper from './components/InputWrapper.vue'
|
||||||
import { getCurrentInstance } from 'vue'
|
import { getCurrentInstance } from 'vue'
|
||||||
import { DatePicker } from 'v-calendar'
|
import { DatePicker } from 'v-calendar'
|
||||||
import 'v-calendar/dist/style.css'
|
import 'v-calendar/dist/style.css'
|
||||||
import { format } from 'date-fns'
|
import { format, startOfDay, endOfDay } from 'date-fns'
|
||||||
import { tailwindcssPaletteGenerator } from '~/lib/colors.js'
|
import { tailwindcssPaletteGenerator } from '~/lib/colors.js'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|
@ -145,13 +145,13 @@ const inputClasses = computed(() => {
|
||||||
|
|
||||||
const minDate = computed(() => {
|
const minDate = computed(() => {
|
||||||
if (props.disablePastDates) {
|
if (props.disablePastDates) {
|
||||||
return new Date()
|
return startOfDay(new Date())
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
})
|
})
|
||||||
const maxDate = computed(() => {
|
const maxDate = computed(() => {
|
||||||
if (props.disableFutureDates) {
|
if (props.disableFutureDates) {
|
||||||
return new Date()
|
return endOfDay(new Date())
|
||||||
}
|
}
|
||||||
return undefined
|
return undefined
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue