Skip to content

Commit

Permalink
fix(comp:date-picker): fix date picker active value validation (#1076)
Browse files Browse the repository at this point in the history
  • Loading branch information
sallerli1 committed Aug 16, 2022
1 parent 5252258 commit e07eb87
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ export function useRangeActiveValue(
const fromViewYearValue = get(from, 'year')
const toViewYearValue = get(to, 'year')

return fromViewValue < toViewValue && fromViewYearValue <= toViewYearValue
if (fromViewYearValue > toViewYearValue) {
return false
}

return fromViewYearValue < toViewYearValue || fromViewValue < toViewValue
})()
/* eslint-enable indent */
}
Expand Down

0 comments on commit e07eb87

Please sign in to comment.