We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6d1154 commit e861581Copy full SHA for e861581
src/VueDatePicker/components/DatepickerInput.vue
@@ -84,6 +84,7 @@
84
import type { PropType } from 'vue';
85
import type { DynamicClass, InternalModuleValue } from '@/interfaces';
86
import { checkStopPropagation } from '@/utils/util';
87
+ import { isAfter } from 'date-fns';
88
89
defineOptions({
90
compatConfig: {
@@ -174,6 +175,7 @@
174
175
if (dateOne) {
176
const parsedDateOne = parser(dateOne.trim());
177
const parsedDateTwo = dateTwo ? parser(dateTwo.trim()) : null;
178
+ if (isAfter(parsedDateOne as Date, parsedDateTwo as Date)) return;
179
180
const parsedArr = parsedDateOne && parsedDateTwo ? [parsedDateOne, parsedDateTwo] : [parsedDateOne];
181
if (checkMinMaxRange(parsedDateTwo as Date, parsedArr as InternalModuleValue, 0)) {
0 commit comments