LiDateTimeValueAccessor class

Writes DateTime values to <input type="datetime-local"> elements and reads them back into AngularDart form controls.

Example:

<input type="datetime-local" [(ngModel)]="scheduledAt">
Annotations
  • @Directive.new(selector: 'input[type=datetime-local][ngControl],' 'input[type=datetime-local][ngFormControl],' 'input[type=datetime-local][ngModel]', providers: [ExistingProvider.forToken(ngValueAccessor, LiDateTimeValueAccessor)])

Constructors

LiDateTimeValueAccessor(HtmlElement element)

Properties

hashCode → int
The hash code for this object.
no setterinherited
onChange ↔ ChangeFunction<DateTime?>
getter/setter pair
onTouched ↔ TouchFunction
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

handleChange(String value) → void
Parses the raw datetime-local string and reports model changes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDisabledChanged(bool isDisabled) → void
Enables or disables the backing input element.
registerOnChange(ChangeFunction<DateTime?> fn) → void
Registers the callback used when the control value changes.
registerOnTouched(TouchFunction fn) → void
Registers the callback used when the control becomes touched.
toString() → String
A string representation of this object.
inherited
touchHandler() → void
Marks the control as touched when the input loses focus.
writeValue(dynamic value) → void
Writes the current model value to the native input in yyyy-MM-ddTHH:mm format.

Operators

operator ==(Object other) → bool
The equality operator.
inherited