-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Generate HTML5 date/time inputs by default #1739
Comments
This can be implemented without breaking change, but just add another config option which is # initializer
SimpleForm.setup do |config|
config.default_html5_date_time = false
end
# input helper (simple_form/inputs/date_time_input.rb#L34)
def use_html5_inputs?
input_options.fetch(:html5, SimpleForm.default_html5_date_time)
end On a major release this can be switched to |
It looks like a bug to be honest. https://github.com/heartcombo/simple_form/blob/main/lib/simple_form/inputs/date_time_input.rb#L35 it doesn't use |
@nashby yes. I think we should match the behavior. |
I just experienced this. For anyone reading, you have explicitly set |
…iguration for the html5 component.
…iguration for the html5 component.
…iguration for the html5 component.
…iguration for the html5 component.
…iguration for the html5 component.
I opened a PR for this. It's not a breaking change, but it's definitely a change to the default behavior since the generated default wrapper is using the |
It's a long time ago since HTML5 date/time support was included in simple_form #935 and since then as the docs describe by default they are disabled #1150 because at the time the browsers weren't ready for them, but I think now 8 years after, the browsers are ready as mdn browser compatibility suggests https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date#browser_compatibility, what do you think about simple_form turn on the generation of these html5 inputs by default?
This probably would be a breaking change and would require a major release, I suppose
The text was updated successfully, but these errors were encountered: