Closed kayatmin closed 7 months ago
I'm not really sure what you mean, maybe a image could help. From what I understand you want to change the background color of the days that are in the past. This goes for the MultiDayView and MonthView.
@werner-scholtz thanks for the quick reply!
i'd like to achieve something like the following:
where the dark bordered tiles are in the past and shaded with grey strips.. preferably also able to disable the click events for these tiles.
Aaah okay, I take it you also don't want those area's to allow the user to create events ?
yes you're right. i could achieve the behavior by checking the current time against the time range given by the event handler on clicks, however i need a way to make those tiles in the past look different.
To achieve the background I recommend you create a custom hourLineBuilder that can draw the background where you need it (hourlines), you can take a look at how the time-indicator works for some inspiration.
CalendarView<Event>(
controller: controller,
eventsController: eventController,
viewConfiguration: currentConfiguration,
tileBuilder: _tileBuilder,
multiDayTileBuilder: _multiDayTileBuilder,
scheduleTileBuilder: _scheduleTileBuilder,
components: CalendarComponents(
hourLineBuilder: _hourlines
),
);
ok, thank you! will dive in deeper.
Cool let me know if you succeed :+1:
Hi I was thinking this might be a good example to add to the package, would you be able to do it ?
Hi, is there a way to customize the tiles? not the event tiles, but just the regular tiles in the calendar.
i'd like to make tiles that are past from DateTime.now show in disabled shaded color.