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

isInvalidDate still allow for selecting a range on either side of the invalid date. #46

Closed
dwjohnston opened this issue Sep 14, 2018 · 8 comments

Comments

@dwjohnston
Copy link
Contributor

This is perhaps a tricky issue as, perhaps you want to allow people to do that (ie. blocking out weekends, but allowing people to still select that range).

In which case - the user could apply their own 'unselect the range' function with datesUpdated - but for the inline picker this means you need to be able to set the set the start date and end date as inputs.

@fetrarij
Copy link
Owner

Hello, I tried to understand but I couldnt. Could you give more details on this?

@dwjohnston
Copy link
Contributor Author

dwjohnston commented Oct 18, 2018

Sure, so say you have January 20 and 21 disabled, you can still select the range 18th Jan to 23rd Jan .

@fetrarij
Copy link
Owner

Thanks,
What would be the right behaviour when this happened in your opinion?
A result with an array of all available date? or the first available date? or just not return a result?

@dwjohnston
Copy link
Contributor Author

dwjohnston commented Oct 19, 2018 via email

@fetrarij
Copy link
Owner

fetrarij commented Nov 23, 2018

@dwjohnston if there are InvalidDates from isInvalidDate function, range (with a date invalid) becomes the first range until the first invalid date.

For our example (say you have January 20 and 21 disabled, you can still select the range 18th Jan to 23rd Jan .), the range become: 18th Jan to 19 Jan (since 20 is the first disabled)

Does this statement solve this issue?

@fetrarij
Copy link
Owner

14488fb this is the commit.

@fetrarij
Copy link
Owner

v1.2.5 is up for it.

@marshall86
Copy link

@dwjohnston if there are InvalidDates from isInvalidDate function, range (with a date invalid) becomes the first range until the first invalid date.

For our example (say you have January 20 and 21 disabled, you can still select the range 18th Jan to 23rd Jan .), the range become: 18th Jan to 19 Jan (since 20 is the first disabled)

Does this statement solve this issue?

About this issue, if i select a range of dates and there are some disabled in said range, the result should be the full range in any case with the disabled dates showed in the calendar.

Can you fix it please?

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

No branches or pull requests

3 participants