horizontal week view calendar
week view calendar is easy to use, highly customizable horizontal calendar.
features
- [x] custom date range (first & last date)
- [x] single or up to x days selection
- [x]
ondateselected
,ondateunselected
,ondatelongtap
,onmaxdateselectionreached
events. - [x] support custom scrollcontroller
- [x] initial selected dates
- [x] granular control to disable dates.
- [x] internationalization support
- [x] month / date / week day label order customization
- [x] month / week day label hide / show
- [x] custom textstyles for month, date, weekday
- [x] custom textstyles for selected month, selected date, selected weekday
- [x] customizable month format (e.g.
mm
,mmm
) - [x] customizable date format (e.g.
dd
,d
) - [x] customizable week day format (e.g.
ee
,eee
) - [x] default date cell decoration
- [x] selected date cell decoration
- [x] disabled date cell decoration
properties
property name | property type | description | default value |
---|---|---|---|
height | double | height of widget | 100 |
firstdate | datetime | first date of calendar | – |
lastdate | datetime | last date of calendar | – |
maxselecteddatecount | int | count of max selectable dates | 1 |
ondateselected | function(datetime datetime) | callback when date is selected | – |
ondatelongtap | function(datetime datetime) | callback when date cell is long pressed | – |
ondateunselected | function(datetime datetime) | callback when date is unselected | – |
onmaxdateselectionreached | voidcallback | callback when max date selection count is reached | – |
initialselecteddates | list<datetime> | list of initially selected dates | empty list |
isdatedisabled | bool function(datetime datetime) | function that returns bool to check if particular date is disabled | – |
labelorder | list<labeltype> | order of labels | [ labeltype.month, labeltype.date, labeltype.weekday] |
scrollcontroller | scrollcontroller | scroll controller of horizontal list | – |
monthtextstyle | textstyle | month label textstyle | titletheme |
selectedmonthtextstyle | textstyle | selected month label textstyle | monthtextstyle |
monthformat | string | format of month | mmm |
datetextstyle | textstyle | date label textstyle | subtitletheme |
selecteddatetextstyle | textstyle | selected date label textstyle | datetextstyle |
dateformat | string | format of date | dd |
weekdaytextstyle | textstyle | week day label textstyle | subtitletheme |
selectedweekdaytextstyle | textstyle | selected week day label textstyle | datetextstyle |
weekdayformat | string | format of week day | eee |
defaultdecoration | decoration | default decoration to be applied to date cell | – |
selecteddecoration | decoration | decoration to be applied to selected date cell | – |
disableddecoration | decoration | decoration to be applied to disabled date cell | – |
spacingbetweendates | double | spacing between two cells of date | 8.0 |
padding | edgeinsetsgeometry | padding to date cell | edgeinsets.all(8.0) |
state management in horizontal week view calendar
initialselecteddates
will only be taken when the widget built for the first time. horizontal_calendar
will manage the subsequent dates selection and un selection.
to get the initial control over the host app, one can pass the uniquekey.
e.g.
horizontalcalendar(
key: uniquekey(),
);
issues and feedback
- for any issue and feedback please create issue on github repo.
Comments are closed.