Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support html5 date input #10

Open
bboyle opened this issue Aug 14, 2012 · 2 comments
Open

support html5 date input #10

bboyle opened this issue Aug 14, 2012 · 2 comments
Labels

Comments

@bboyle
Copy link
Owner

bboyle commented Aug 14, 2012

initial support for type="date" (not datetime, time, month or week—they will be implemented later as needed)

will not set @value to YYYY-mm-dd format. Applications must handle input in varied format as if type="date" was not supported (fallback in browsers is type="text")

will accept any value that can be parsed using new Date( _value_ ) and will polyfill support YYYY-mm-dd formats if not natively supported by the javascript engine.

add .valueAsDate which will be a javascript date object. Will be updated onchange
http://www.whatwg.org/specs/web-apps/current-work/multipage//common-input-element-attributes.html#dom-input-valueasdate

add valueAsNumber as an alias for valueAsDate.getTime()

@bboyle
Copy link
Owner Author

bboyle commented Aug 14, 2012

Handle browsers that support validation API but do not support date input.
e.g. Firefox 14

Cannot edit .validity ValidityState object to set .typeMismatch to false on bad date input.
Can replace .checkValidity() method with custom function (but should use native where possible).

Use custom validity?

@bboyle
Copy link
Owner Author

bboyle commented Aug 14, 2012

Does using custom validity belong in the polyfill file or should it be moved to another script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant