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

unavailable dates shows half days on the calendar #237

Open
anneleenpeeters opened this issue Jun 19, 2020 · 0 comments
Open

unavailable dates shows half days on the calendar #237

anneleenpeeters opened this issue Jun 19, 2020 · 0 comments

Comments

@anneleenpeeters
Copy link

When I select a room, the unavailable dates appear. Instead of a series of unavailable dates, he only shows the half days of this series in the calendar. But when I click on my due date, it does show the full set of unavailable dates.

When I select a room:
Schermafbeelding 2020-06-19 om 11 46 53

When I clicked on the end date:
Schermafbeelding 2020-06-19 om 11 47 29

What it should do:
So what I would like is that the calendar immediately shows the full range of unavailable dates instead of only showing when I have indicated the end date.

This is my code:
Schermafbeelding 2020-06-19 om 11 51 08

This code:

setDateRanges(dateRanges => dateRanges.sort((a, b) => moment(a.range.start).isBefore(moment(b.range.start)) ? -1 : 1))

This code sorts the dates in the correct order and should normally solve this problem. But in my code it doesn't solve this problem.

Does anyone have an idea how I can fix this?
Thank you

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

1 participant