Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
0e795c93
Unverified
Commit
0e795c93
authored
May 20, 2020
by
LongCatIsLooong
Committed by
GitHub
May 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve CupertinoDatePicker docs (#57534)
parent
97b7e155
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
15 deletions
+39
-15
date_picker.dart
packages/flutter/lib/src/cupertino/date_picker.dart
+39
-15
No files found.
packages/flutter/lib/src/cupertino/date_picker.dart
View file @
0e795c93
...
...
@@ -211,15 +211,17 @@ class CupertinoDatePicker extends StatefulWidget {
/// the intervals set in [minimumDate], [maximumDate], [minimumYear], and
/// [maximumYear].
///
/// [minimumDate] is the minimum [DateTime] that the picker can be scrolled to.
/// Null if there's no limit. In [CupertinoDatePickerMode.time] mode, if the
/// date part of [initialDateTime] is after that of the [minimumDate], [minimumDate]
/// has no effect.
/// [minimumDate] is the minimum selectable [DateTime] of the picker. When set
/// to null, the picker does not limit the minimum [DateTime] the user can pick.
/// In [CupertinoDatePickerMode.time] mode, [minimumDate] should typically be
/// on the same date as [initialDateTime], as the picker will not limit the
/// minimum time the user can pick if it's set to a date earlier than that.
///
/// [maximumDate] is the maximum [DateTime] that the picker can be scrolled to.
/// Null if there's no limit. In [CupertinoDatePickerMode.time] mode, if the
/// date part of [initialDateTime] is before that of the [maximumDate], [maximumDate]
/// has no effect.
/// [maximumDate] is the maximum selectable [DateTime] of the picker. When set
/// to null, the picker does not limit the maximum [DateTime] the user can pick.
/// In [CupertinoDatePickerMode.time] mode, [maximumDate] should typically be
/// on the same date as [initialDateTime], as the picker will not limit the
/// maximum time the user can pick if it's set to a date later than that.
///
/// [minimumYear] is the minimum year that the picker can be scrolled to in
/// [CupertinoDatePickerMode.date] mode. Defaults to 1 and must not be null.
...
...
@@ -296,12 +298,34 @@ class CupertinoDatePicker extends StatefulWidget {
/// selected date time.
final
DateTime
initialDateTime
;
/// Minimum date that the picker can be scrolled to in [CupertinoDatePickerMode.date]
/// and [CupertinoDatePickerMode.dateAndTime] mode. Null if there's no limit.
/// The minimum selectable date that the picker can settle on.
///
/// When non-null, the user can still scroll the picker to [DateTime]s earlier
/// than [minimumDate], but the [onDateChangeCallback] will not be called on
/// these [DateTime]s. Once let go, the picker will scroll back to [minimumDate].
///
/// In [CupertinoDatePickerMode.time] mode, a time becomes unselectable if the
/// [DateTime] produced by combining that particular time and the date part of
/// [initialDateTime] is earlier than [minimumDate]. So typically [minimumDate]
/// 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 earliest [DateTime] the user can select.
final
DateTime
minimumDate
;
/// Maximum date that the picker can be scrolled to in [CupertinoDatePickerMode.date]
/// and [CupertinoDatePickerMode.dateAndTime] mode. Null if there's no limit.
/// The maximum selectable date that the picker can settle on.
///
/// When non-null, the user can still scroll the picker to [DateTime]s later
/// than [maximumDate], but the [onDateChangeCallback] will not be called on
/// these [DateTime]s. 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.
final
DateTime
maximumDate
;
/// Minimum year that the picker can be scrolled to in
...
...
@@ -319,9 +343,9 @@ class CupertinoDatePicker extends StatefulWidget {
/// Whether to use 24 hour format. Defaults to false.
final
bool
use24hFormat
;
/// Callback called when the selected date and/or time changes. If the new
selected
///
[DateTime] is not valid, or is not in the [minimumDate] through [maximumDate]
/// range, this callback will not be called.
/// Callback called when the selected date and/or time changes. If the new
///
selected [DateTime] is not valid, or is not in the [minimumDate] through
///
[maximumDate]
range, this callback will not be called.
///
/// Must not be null.
final
ValueChanged
<
DateTime
>
onDateTimeChanged
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment