[grid]
I assume this is you letting users pick a day to book your service, not the service provider choosing days when they are available?
If that’s the case, I think the easiest way for you is to have a table where you have all 7 days in 7 rows.
Then filter the choices by day is included in “OpenDays”.
it’s the service provider choosing days when they are available,and user only can choose days choose by the provider
Yes, then does the solution above fit your use case?
cant filter it because the the source is from other (Day) tables,the OpenDays is from User table
Where are the “days chosen by the provider” stored in your database?
first pic is from User table,second is Day table,the source for the choice should be from Day table,and filtered by OpenDay in User table.
It’s still not clear what you’re trying to achieve.
Are you saying that you want users to ultimately select a date and not a weekday?
If the open days is Monday, Tuesday, Wednesday, do you want them to choose “Monday, December 2”, “Tuesday, December 3”, “Wednesday, December 4”?
yes
You can have a setup like this.
N-HOUR(N)/24-MINUTE(N)/24/60-SECOND(N)/24/60/60-WEEKDAY(N)+2+I
Extra: You only need to do this if you need the weekday in your data, which I think you need to connect with the availability of providers.
const daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
return daysOfWeek[p1]