Change datetime to datetime-local helper tag#25469
Conversation
A change was made in the helper that renders the `datetime`, being now by default `datetime-local` and creating an alias of `datetime-local` for `datetime`, `datetime` tag and it passes to be an abstract class for all other tags that inherit from him. As a new specification of the HTML 5 the text field type `datetime` will no longer exist and will pass a `datetime-local`. Ref: https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local)
|
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @arthurnn (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
|
|
He is pair programming with me, I asked this change. I prefer to keep |
| Tags::DatetimeLocalField.new(object_name, method, self, options).render | ||
| end | ||
|
|
||
| alias datetime_local_field datetime_field |
There was a problem hiding this comment.
Do we need to change the deprecation shipping with 5.0 if we are not deprecating this, and aliasing instead? 😬
…time-local-by-html-specification Change datetime to datetime-local helper tag
…time-local-by-html-specification Change datetime to datetime-local helper tag
|
Thanks for this! Definitely needed. |
Add following. * rails@05934d2 * rails@38d2bf5 * rails#25469
The `DateTimeInput` `type` assertions test was relaxed due rails/rails#25469, as it only affects Rails 5+ apps.
The `datetime_field` is an alias of the `datetime_local_field`, there is no helper to generate datetime fields. Ref: rails#25469
A change was made in the helper that renders the
datetime,being now by default
datetime-localand creatingan alias of
datetime-localfordatetime,datetimetag andit passes to be an abstract class for all other tags that inherit from him.
As a new specification of the HTML 5 the text field type
datetimewill no longer exist and will pass a
datetime-local.Ref: https://html.spec.whatwg.org/multipage/forms.html#local-date-and-time-state-(type=datetime-local)