disabledDatesDecoration property
The decoration for the disabled cells of SfHijriDateRangePicker year and decade view.
Here, disabled cells are the one which falls beyond the minimum and maximum date range.
Defaults to null.
Using a SfDateRangePickerTheme
gives more fine-grained control over the
appearance of various components of the date range picker.
See also:
- disabledDatesTextStyle, which used to set text style for the disabled date cells in the year views of date range picker.
- cellDecoration, which used to set decoration for the year cell in the year views of the date range picker.
- todayCellDecoration, which used to set decoration for the today date cell in the year views of the date range picker.
- SfHijriDateRangePicker.selectionColor, which fills the background of the selected cells in the date range picker.
- SfHijriDateRangePicker.startRangeSelectionColor, which fills the background of the first cell of the range selection in date range picker.
- SfHijriDateRangePicker.endRangeSelectionColor, which fills the background of the last cell of the range selection in date range picker.
- SfHijriDateRangePicker.rangeSelectionColor, which fills the background of the in between cells of date range picker in range selection.
- Knowledge base: How to apply theming
- Knowledge base: How to style the year, decade and century views
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfHijriDateRangePicker(
controller: _pickerController,
view: HijriDatePickerView.decade,
selectionMode: DateRangePickerSelectionMode.range,
yearCellStyle: HijriDatePickerYearCellStyle(
disabledDatesDecoration: BoxDecoration(
color: Colors.black.withOpacity(0.4),
border: Border.all(color: const Color(0xFF2B732F),
width: 1),
shape: BoxShape.rectangle),
),
),
),
);
}
Implementation
final Decoration? disabledDatesDecoration;