bibekg / react-schedule-selector

A mobile-friendly when2meet-style grid-based schedule selector
MIT License
147 stars 51 forks source link

Possible to add multiple "selection" levels? #66

Open apropp opened 1 year ago

apropp commented 1 year ago

Hi there! If we want to allow users to make multiple types of selections (e.g. "preferred" times and "available" times, designated by different colors) on the calendar, how would you suggest doing that? Thanks!

bibekg commented 1 year ago

The ScheduleSelector component itself doesn't support any notion of "preferred" vs. "available" but you can use the renderDateCell to customize exactly how you want to render each cell based on your own data/conditions. Here's an example for your use case: https://codesandbox.io/s/react-schedule-selector-available-vs-preferred-example-jpnzkc?file=/index.js