mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Reverts: flutter/flutter#150355
Initiated by: chingjun
Reason for reverting: this is breaking an internal test.
Original PR Author: Chuckame
Reviewed By: {victorsanni, MitchellGoodwin}
This change reverts the following previous change:
- Closes #63973
- Now able to provide a `selectableDayPredicate`
- No breaking change (same behavior as before if not set)
- Reuse the same feature as the DatePicker: non-selectable days are greyed and not clickable
- Reuse the same error message as if the user set a wrong date range
- Made public `CalendarDateRangePicker`, actually the same for `CalendarDatePicker`, to allow using the range picker outside the `showDateRangePicker` bottom sheet modal
## Examples
- Disable days after the next non selectable day when start day has been selected
https://github.com/flutter/flutter/assets/16419143/2a2be325-1e2f-470c-8b17-b4ed5b2ad43e
- Select a range including non-selectable days
<img width="363" alt="image" src="https://github.com/flutter/flutter/assets/16419143/21e32def-46f0-41d6-974f-281a0405e28e">
Flutter
Flutter is a new way to build high-performance, cross-platform mobile, web, and desktop apps. Flutter is optimized for today's — and tomorrow's — mobile and desktop devices. We are focused on low-latency input and high frame rates on all platforms.
See the getting started guide for information about using Flutter.