Objective of the PR :
In my use-case, I've got events occurring over a few days.
For those specific events, I want to be able to show a view with a specific design for the start day, a specific design for the end day, and a specific design for the in-between.
Content of the PR :
To achieve what I needed, I re-used the logic you implemented with the "Range Selection".
You can now add the parameter highlightedPeriods, which takes a list of Period objects (which is just holding a start date and an end date).
Those highlightedPeriod will be displayed as follows
I think that the "Range Selection" is more important than displaying those events occurring over a few days : for this reason, during the Range Selection, the design of the calendar is overwritten by the design declared for the Range Selection.
Everything can be customized thanks to the CalendarStyle and the CalendarBuilders parameters.
I didn't modify a lot of existing code, it shouldn't impact any of the current users, and I added some tests.
The tests are mainly here to securise the Period object : I wrote an algorithm which job is to merge the overlapping periods that the user can pass as a parameter to the Calendar, easing the display process.
Objective of the PR :
In my use-case, I've got events occurring over a few days.
For those specific events, I want to be able to show a view with a specific design for the start day, a specific design for the end day, and a specific design for the in-between.
Content of the PR :
To achieve what I needed, I re-used the logic you implemented with the "Range Selection".
You can now add the parameter
highlightedPeriods
, which takes a list ofPeriod
objects (which is just holding a start date and an end date). ThosehighlightedPeriod
will be displayed as followshttps://github.com/aleksanderwozniak/table_calendar/assets/33631420/36cc57a7-bcee-4b7f-9ec8-a18fe0157f3e
I think that the "Range Selection" is more important than displaying those events occurring over a few days : for this reason, during the Range Selection, the design of the calendar is overwritten by the design declared for the Range Selection.
Everything can be customized thanks to the
CalendarStyle
and theCalendarBuilders
parameters.I didn't modify a lot of existing code, it shouldn't impact any of the current users, and I added some tests. The tests are mainly here to securise the
Period
object : I wrote an algorithm which job is to merge the overlapping periods that the user can pass as a parameter to the Calendar, easing the display process.