maximumDate property Null safety

DateTime? maximumDate
final

The maximum selectable date that the picker can settle on.

When non-null, the user can still scroll the picker to DateTimes later than maximumDate, but the onDateTimeChanged will not be called on these DateTimes. Once let go, the picker will scroll back to maximumDate.

In CupertinoDatePickerMode.time mode, a time becomes unselectable if the DateTime produced by combining that particular time and the date part of initialDateTime is later than maximumDate. So typically maximumDate needs to be set to a DateTime that is on the same date as initialDateTime.

Defaults to null. When set to null, the picker does not impose a limit on the latest DateTime the user can select.

Implementation

final DateTime? maximumDate;