React-big-calendar: How can I restrict the time ranges when a user can create an event?

Created on 1 Jul 2019  路  4Comments  路  Source: jquense/react-big-calendar

I think it is a feature unless there is a documentation bug
Missing feature of restricting the event selection to certain time ranges
The expected behavior is to create a calendar with a list of allow ranges to select from
<Calendar selectRanges = [ {start:{...}, end:{...}} {start:{...}, end:{...}}, {start:{...}, end:{...}} ] />
If this feature is not supported I'll be happy if you can share some high level instructions of how to implement it.
Thanks,

wontfix

Most helpful comment

@KhaledMohamedP Thanks for sharing - Your solution will work, but its not elegant as I expect the calendar to support it directly.

All 4 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@moshebeeri I don't think this is supported at the moment. I would actually like something like this too 馃憤

My current solution for this is to add an event with custom styling (grey background) & hide the text.

If you want to avoid users from selecting a range on top of these grey events, you can use the
onSelecting callback doc and return false ...

@KhaledMohamedP Thanks for sharing - Your solution will work, but its not elegant as I expect the calendar to support it directly.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nirchernia picture nirchernia  路  3Comments

Hector26 picture Hector26  路  3Comments

connercms picture connercms  路  3Comments

nicolasriccardi picture nicolasriccardi  路  3Comments

manutenfruits picture manutenfruits  路  3Comments