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

Possible to display a given set of dates/times on the schedule without user selection? #67

Open
apropp opened this issue Feb 26, 2023 · 1 comment

Comments

@apropp
Copy link

apropp commented Feb 26, 2023

Hello! I currently save users' availabilities in Firebase and want to allow them to update them later. Is there a way i can load the existing schedule onto the rendered schedule selector, so that times/dates they selected previously will appear as dark blue and they can add/remove times as they wish? I have successfully read the data from firebase and saved it to this.state.schedule, but am struggling to get it to display on the selector. Thanks!

@bibekg
Copy link
Owner

bibekg commented Feb 26, 2023

Hello, yes this should be possible by simply initializing your rendering component's state with the previously saved data and passing that into the ScheduleSelector component's schedule prop. Here's an example: https://codesandbox.io/s/react-schedule-selector-initialization-example-74l03t

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

2 participants