Skip to content

Commit 6ac54ff

Browse files
committed
fix: null values in min and max date with prevent-min-max-navigation stops navigation altogether (fixes #951)
1 parent cc9cf10 commit 6ac54ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/VueDatePicker/composables/validation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const useValidation = (props: PickerBasePropsType | AllPropsType) => {
9494

9595
const validateMonthYearInRange = (month: number, year: number, isNext: boolean, preventNav: boolean): boolean => {
9696
let valid = false;
97-
if (preventNav) {
97+
if (preventNav && (propDates.value.minDate || propDates.value.maxDate)) {
9898
if (propDates.value.minDate && propDates.value.maxDate) {
9999
valid = validateBothMinAndMax(month, year, isNext);
100100
} else if (propDates.value.minDate && validateMinDate(month, year)) {

0 commit comments

Comments
 (0)