Reading InputElement.valueAsDate results in NullError (Cannot call "getTime" on null), but should just be null value #17625
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
closed-obsolete
Closed as the reported issue is no longer relevant
library-html
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
This issue was originally filed by @chalin
What steps will reproduce the problem?
In particular, notice that reading valueAsDate results in a NullError.
What is the expected output? What do you see instead?
Expected output (as generated from Dartium)
number.value => ''
number.valueAsNumber => NaN
number.valueAsDate => null
date.value => ''
date.valueAsNumber => NaN
date.valueAsDate => null
etc for time, datetime, month and week as well.
Instead, what we get when runing the JS version from Chrome:
number.value => ''
number.valueAsNumber => NaN
number.valueAsDate => Exception: NullError: Cannot call "getTime" on null
date.value => ''
date.valueAsNumber => NaN
date.valueAsDate => Exception: NullError: Cannot call "getTime" on null
etc for time, datetime, month and week as well.
What version of the product are you using? On what operating system?
Dart SDK version 1.3.0-dev.4.1
MacOS X 10.9
Please provide any additional information below.
Attachment:
dart_date_bug.zip (86.59 KB)
The text was updated successfully, but these errors were encountered: