Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for 'isAllowed' test in VDPickerYears.spec.js #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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