rangeSelectionColor property
The color which fills the SfDateRangePicker selection view for the range of dates which falls between the PickerDateRange.startDate and PickerDateRange.endDate.
The color fills to the selection view of the dates in between the PickerDateRange.startDate and PickerDateRange.endDate property.
Defaults to null.
Using a SfDateRangePickerTheme
gives more fine-grained control over the
appearance of various components of the date range picker.
Note : It is applies only when the DateRangePickerSelectionMode set as DateRangePickerSelectionMode.range of DateRangePickerSelectionMode.multiRange.
See also:
- selectionShape, which allows to customize the shape of the selection view in date range picker.
- selectionColor, which fills the background of the selected cells in the date range picker.
- startRangeSelectionColor, which fills the background of the first cell of the range selection in date range picker.
- endRangeSelectionColor, which fills the background of the last cell of the range selection in date range picker.
- selectionRadius, which is the radius for the selection view in the date range picker when the selection shape set as DateRangePickerSelectionShape.circle.
- selectionTextStyle, which is used to set the text style for the text in the selected cell of date range picker.
- rangeTextStyle, which is used to set text style for the text in the selected range cell's of date range picker.
- Knowledge base: How to change the selection radius
- Knowledge base: How to customize the selected range cells
- Knowledge base: How to change the selection shape
- Knowledge base: How to customize the selected month cell
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
controller: _pickerController,
view: DateRangePickerView.month,
selectionMode: DateRangePickerSelectionMode.range,
rangeSelectionColor: Colors.red.withOpacity(0.4),
),
),
);
}
Implementation
final Color? rangeSelectionColor;