react-native-week-view
react-native-week-view copied to clipboard
Add business hours
I think it will be a good feature to have, I was thinking of a props like fullcalendar :
businessHours: [ // specify an array instead
{
daysOfWeek: [ 1, 2, 3 ], // Monday, Tuesday, Wednesday
startTime: '08:00', // 8am
endTime: '18:00' // 6pm
},
{
daysOfWeek: [ 4, 5 ], // Thursday, Friday
startTime: '10:00', // 10am
endTime: '16:00' // 4pm
}
]
In the current version, the only way I found to do that is to add holidays or week-ends (hours outside business hours) as events and add some grey style and make them unclickable.
Yeah so you can define your "available" or "not available" time. Something à la SavvyCal https://savvycal.com
This is somewhat similar to #92.
What else would the non-business hours need? Other than being non-pressable and from a different color. Or what would the business hours need?
This is somewhat similar to #92.
What else would the non-business hours need? Other than being non-pressable and from a different color. Or what would the business hours need?
Pressable or non-pressable should be optional I think, the only thing essential is making non-business hours with grey as color or different color (it can have events)
Thanks for the answer. Indeed this is very similar to the timeslot use-case, something like changing the background style of the grid without affecting the events too much.
For now, I would kindly suggest you to keep using the current workaround that you mentioned, i.e. using dummy grey events. I do not see a clear way to implement this soon, and there are other features that have precedence. In the long-term we could definitely add this, good to know there are more use-cases for this!
In any case, we are open to suggestions or more ideas into more requeriments of this, how to tackle this, etc (or PRs :slightly_smiling_face:)
An additional tip (in case you haven't done this) you can set a lower opacity in the color for the dummy events, e.g. color: 'rgba(100,100,100,0.2)'
(or in any event, for that matter)
Any update on this one?
Update: check this comment with a solution to a similar problem.
Feel free to reopen the issue if needed
Yeah this is amazing, thanks for the update @pdpino