Skip to content

unavailable dates shows half days on the calendar #237

@anneleenpeeters

Description

@anneleenpeeters

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions