I am working on a Agenda-like RN App. This specific component receives from the backend an array of weekdays/times that are going to be available to add an Event. Moreover, it receives an array of previously added events. The structure is similar to this:
Event
{
title: string,
date: date
start_time: time,
end_time: time
}
Available times
{
weekday: number,
start_time: time,
end_time: time
}
I would like to block every weekday that is not an available weekday (e.g. block all sundays and wednesdays). Also, I want to block the times that are out of the available time range and/or were taken by an event.
Any idea how would I do that? I am using the react-native-community/datetimepicker, but if it is not possible to do with that, I am fully open to other solutions