allowViewNavigation property
Used to enable or disable the view switching between DateRangePickerView through interaction in the SfDateRangePicker header.
Selection is allowed for year, decade and century views when the allowViewNavigation property is false. Otherwise, year, decade and century views are allowed only for view navigation.
Defaults to true
.
See also:
- view, which allows to set different views which display initially on date range picker.
- DateRangePickerController.view, which allows to set different views dynamically on date range picker.
- Knowledge base: How to restrict the year view navigation while tapping header
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: SfDateRangePicker(
allowViewNavigation: false,
),
),
);
}
Implementation
final bool allowViewNavigation;