selectionShape property
Defines the shape for the selection view in SfDateRangePicker.
If this property set as DateRangePickerSelectionShape.rectangle the widget will render the date selection in the rectangle shape in month view.
Defaults to DateRangePickerSelectionShape.circle
.
Note: When the view set with any other view than DateRangePickerView.month the today cell highlight shape will be determined by this property.
If the DateRangePickerSelectionShape is set as DateRangePickerSelectionShape.circle, then the circle radius can be adjusted in month view by using the selectionRadius property.
See also:
- selectionMode, which allows to customize the selection mode with available mode options.
- allowViewNavigation, which allows to navigate between views quickly,
and setting this property as
false
, allows to select the cells on year, decade and century view of 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.
- rangeSelectionColor, which fills the background of the in between cells of date range picker in range selection.
- 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(
view: DateRangePickerView.month,
selectionMode: DateRangePickerSelectionMode.multiple,
showNavigationArrow: true,
selectionShape: DateRangePickerSelectionShape.rectangle,
),
),
);
}
Implementation
final DateRangePickerSelectionShape selectionShape;