MaterialDateTimePickerComponent class
A material-design-styled single date and time picker.
The selected dateTime is always in local time zone.
See material-datepicker
if you want to choose date only.
See material-time-picker
if you want to choose time only.
Example usage:
<material-date-time-picker [(dateTime)]="myDateTime">
</material-date-time-picker>
- Implemented types
- Annotations
-
- @Component(selector: 'material-date-time-picker', changeDetection: ChangeDetectionStrategy.onPush, templateUrl: 'material_date_time_picker.html', styleUrls: ['material_date_time_picker.scss.css'], directives: [MaterialDatepickerComponent, MaterialTimePickerComponent, MaterialInputComponent], providers: [ExistingProvider(HasDisabled, MaterialDateTimePickerComponent)])
Constructors
- MaterialDateTimePickerComponent(@Inject(datepickerClock) Clock _clock)
Properties
- date ↔ Date?
-
The selected date or null if the date picker has invalid input.
getter/setter pair
- dateTime ↔ DateTime?
-
The selected date time.
getter/setter pair
-
dateTimeChange
→ Stream<
DateTime?> -
Publishes events when the selected dateTime changes.
no setter
- disabled ↔ bool
-
Whether changing the selected date and time should be disabled.
getter/setter pairoverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- increment ↔ int
-
Increment of time dropdown options in minutes, passed on to time picker.
getter/setter pair
- maxDate → Date?
-
no setter
- maxDateTime ↔ DateTime?
-
Maximum date time that can be chosen by the user.
getter/setter pair
- maxTime → DateTime?
-
Returns maximum time for time picker when selected date is maximum date.
no setter
- minDate → Date?
-
no setter
- minDateTime ↔ DateTime?
-
Minimum date time that can be chosen by the user.
getter/setter pair
- minTime → DateTime?
-
Returns minimum time for time picker when selected date is minimum date.
no setter
- outputDateFormat ↔ DateFormat
-
The format used to format dates.
getter/setter pair
- outputTimeFormat ↔ DateFormat
-
The format used to format time.
getter/setter pair
- required ↔ bool
-
Whether the date and time entry is required.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- time ↔ DateTime?
-
The selected time or null if the user blanks it out.
getter/setter pair
- utc ↔ bool
-
Whether the widget returns dateTime in the UTC time zone.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setTimeToNowIfUnset(
) → void - Sets dateTime to now if it's null.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
cloneDateTime(
DateTime? dateTime) → DateTime?