ZdsDateRangePickerTile class
A DateRange picker tile that allows to select the from and to dates separately. This can be used if we want to allow the user to select all the dates before a certain date, or all the dates after one.
This Widget keeps track of the dates selected. If you want to synchronise these dates with the parent's state, use onInitialDateChanged and onFinalDateChanged.
See also:
- ZdsDateTimePicker, which allows to select a day and hour together or separately
- showDatePicker to show a date picker directly
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ZdsDateRangePickerTile
- Available extensions
Constructors
-
ZdsDateRangePickerTile({Key? key, DateTime? initialDate, DateTime? finalDate, void onInitialDateChanged(DateTime?)?, void onFinalDateChanged(DateTime?)?, DateTime? earliestSelectableDate, DateTime? latestSelectableDate, ZdsValueController<
DateTime> ? initialDateController, ZdsValueController<DateTime> ? finalDateController, String format = 'dd/MM/yyyy', String? initialHelpText, String? finalHelpText, String errorMessage = '', GlobalKey<FormState> ? formKey, int? startDayOfWeek, String? okClickText, String? cancelClickText}) - A DateRangePicker that allows to pick the "From" and "To" dates separately.
Properties
- cancelClickText → String?
-
The text displayed on the cancel button.
final
- earliestSelectableDate → DateTime?
-
The earliest date that can be selected. Must be before the latestSelectableDate.
final
- errorMessage → String
-
The error message shown when an invalid date range is entered.
final
- finalDate → DateTime?
-
The DateTime selected in the "To" field. Set this if you want pre-initialized dates.
final
-
finalDateController
→ ZdsValueController<
DateTime> ? -
A controller used to keep track of the selected final date.
final
- finalHelpText → String?
-
The text displayed at the top of the final date picker window.
final
- format → String
-
The format in which the DateTime will be formatted.
final
-
formKey
→ GlobalKey<
FormState> ? -
The key attached to the form within the picker that can be used to check the validation of the inputs.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialDate → DateTime?
-
The DateTime selected in the "From" field. Set this if you want pre-initialized dates.
final
-
initialDateController
→ ZdsValueController<
DateTime> ? -
A controller used to keep track of the selected initial date.
final
- initialHelpText → String?
-
The text displayed at the top of the initial date picker window.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- latestSelectableDate → DateTime?
-
The latest date that can be selected. Must be after the earliestSelectableDate.
final
- okClickText → String?
-
The text displayed on the ok button.
final
- onFinalDateChanged → void Function(DateTime?)?
-
A function called whenever the final date changes. Use this to synchronise the DateRange's date with a date in
the parent's state.
final
- onInitialDateChanged → void Function(DateTime?)?
-
A function called whenever the initial date changes. Use this to synchronise the DateRange's date with a date in
the parent's state.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startDayOfWeek → int?
-
Starting day of week 1, 2, 3, Sunday, Monday, Tuesday respectively.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ZdsDateRangePickerTile> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited