-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fixes #150: Native date time widgets. #158
Conversation
b68ec57
to
2361e30
Compare
We should probably keep the select-based date widgets as default ones, as support of native ones isn't great across platforms just yet. Edit: after discussing about that with @leplatrem, we decided to keep it this way. |
properties: { | ||
native: { | ||
title: "Native", | ||
description: "Note that a few browsers support these.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: May not work on some browsers
could be enough ?
7aa49ed
to
025eacb
Compare
Can we know what the turning point was? As the default HTML5 date input doesn't work on almost all non-mobile platforms. I would suggest having something that works for all platforms by default instead. |
Pushing and promoting Web standards. |
Note: For Firefox, bug 825294 should land anytime soon. MSDN strangely declares it supported, so maybe it's just matter of time for it to land on a stable version? |
Mouarf, pushing and promoting web standards is great, but we should make our library users aware that this will not work for most of their users, and probably propose an alternative solution. |
That's probably why I've added a specific section in the documentation along providing alternative widgets compatible with those other platforms. |
Perfect! :) |
- More formats could be supported in a near future, feel free to help us going faster! | ||
- `date-time`: By default, an `input[type=datetime-local]` element is used; if you solely want to rely on a date, a `date` uiSchema alternative widget is available: | ||
|
||
![](http://i.imgur.com/xqu6Lcp.png) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe imgur isn't a good place to host these images, as the pictures could disapear any time. Should we host them in this very repository instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no easy way to make github serving images hosted in the repo itself. Also, if these are ever gone it's no big deal to redo some captures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's possible to do it like that:
![alt tag](https://raw.githubusercontent.com/mozilla-services/react-jsonschema-form/master/path/to/img.png)
I'm gonna land this with r=me. |
WiP, refs #150 /cc @kaihendry
This adds new native date and datetime widgets which are now used by default, and demotes previous default select-based date widgets as alternative ones.
Todo
(hard as jsdom doesn't have a clue what these inputs are)