Skip to content

Conversation

@elyse0
Copy link

@elyse0 elyse0 commented Oct 9, 2021

The isBeforeDate(date, beforeDate, type) was failing to convert a simple number into a year, causing 2019 to be an invalid year between 2018 and 2020.

[{ min: '2018', max: '2020' }, 2019, true],

Fixes #85

The dayjs(date, 'YYYY-MM-DD').get('year') was failing to convert
a number into a year.

For example, if date = 2020, it would return 2019. It's necessary
to pass a formated date to avoid this bad conversion.
@georgelazar
Copy link

georgelazar commented Aug 16, 2022

So it looks like if you change your time zone to a negative one like US year 2021 is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When max-date is set, 2020 is disabled in the year picker.

2 participants