Skip to content

Loading…

DatetimePickerInput ignores the default time format #931

Closed
shaicoleman opened this Issue · 2 comments

2 participants

@shaicoleman

I have an initializer that changes the default time and date formats:
Time::DATE_FORMATS.merge!(:default => '%d/%b/%Y %H:%M')

The DatetimePickerInput hardcodes the format to "%Y-%m-%d %H:%M" instead of using the default time format.

@justinfrench
Owner

Would love to see a pull request please!

@justinfrench
Owner

Closing due to a lack of activity.

http://dev.w3.org/html5/markup/input.datetime.html#input.datetime.attrs.value seems to specify that the value must conform to the format we use, not the format you would prefer in your app. It's up to the browser to format it for the user, not the value attribute.

See http://stackoverflow.com/a/9519493/222012 for more information, although I admit I'm not an expert on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.