timetable icon indicating copy to clipboard operation
timetable copied to clipboard

Working hours theming

Open TatsuUkraine opened this issue 3 years ago • 7 comments

I will start with a question) If this widget doesn't provide this functionality - I will convert it to feature request)

So the question is: Is it possible to style hour cells, or maybe add some overlay to the date column to highlight time ranges that are available for selection?

For instance, some business or person works on Monday from 9am till 6pm. And he has launch time from 1:30pm till 2pm. So I want to reflect that in the time table, by adding a grey background to all day, except range 9am-1:30pm and 2pm-6pm.

Thanks for the answer.

TatsuUkraine avatar Jul 10 '20 15:07 TatsuUkraine

here is a small example, that I took from a different library

example

TatsuUkraine avatar Jul 10 '20 16:07 TatsuUkraine

This currently isn't supported, but sounds like a useful feature! Do you have a link to that library? (I'm curious how their API for configuring this looks.)

Unfortunately, the exam period of my university starts very soon, so I don't know when I'll have the time to implement this.

JonasWanke avatar Jul 10 '20 17:07 JonasWanke

I took this photo from syncfusion_flutter_calendar , but im not sure that they have good API, for instance this greyed sectors is actually disabled areas. And I'm not sure that it's a right approach

TatsuUkraine avatar Jul 10 '20 17:07 TatsuUkraine

In my opinion better to have standalone builder for this kind of overlays. And make this non-working hours still available for selection. It will be much more useful, since in that case dev can decide on they're own, if they want to do anything, when selected dateTime (on background tap) is in this area or not

TatsuUkraine avatar Jul 10 '20 17:07 TatsuUkraine

Like an option API may look like eventProvider property, that also can work with date based stream or static array. And it can accept something similar to current Event object, with start and end date

TatsuUkraine avatar Jul 10 '20 17:07 TatsuUkraine

@JonasWanke I made smaaal PR with a proposal on how Overlay data can be provided. Please let me know what you think. https://github.com/TatsuUkraine/timetable/pull/3

TatsuUkraine avatar Jul 12 '20 14:07 TatsuUkraine

it doesn't have actual render implementation, just an interface with how data for overlays can be provided

TatsuUkraine avatar Jul 12 '20 14:07 TatsuUkraine