Open entioentio opened 4 years ago
Thanks for the PR!
What sort of error do you have when the year range is descending? Does the rendering fail?
You can't select months because this check fails:
const outsideYearRange = firstDayOfNextMonth.getFullYear() > sortedYearRange[sortedYearRange.length - 1];
.
Previous array element is bigger then the current, so it is always "outsideYearRange".
Ah, I see.
From UX point of view years should be sorted descending for some cases, for example for choosing date of birth. You want to give people in thier 20s more prio than people in their 90s.
Fixing in #491