view property
Defines the view for the SfDateRangePicker.
Default to DateRangePickerView.month
.
Note: If the controller and it's controller.view
property is not
null, then this property will be ignored and widget will display the view
described in controller.view
property.
See also:
- DateRangePickerView, to know more about the available views in the date range picker.
- DateRangePickerController.view, which used to changed the view of date range picker dynamically.
- allowViewNavigation, which allows to navigate to different date range picker views quick and easily by tapping on the header.
- How to switch between the date range picker views when calendar has appointments
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
view: DateRangePickerView.year,
minDate: DateTime(2019, 02, 05),
maxDate: DateTime(2021, 12, 06),
),
),
);
}
Implementation
final DateRangePickerView view;