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

[FORMS] DatetimeField not supported in Firefox or IE #7955

Closed
JorisDebonnet opened this issue Mar 26, 2018 · 4 comments
Closed

[FORMS] DatetimeField not supported in Firefox or IE #7955

JorisDebonnet opened this issue Mar 26, 2018 · 4 comments

Comments

@JorisDebonnet
Copy link
Contributor

Affected Version

4.1.0

Description

I am using silverstripe/blog, and notice that I do not get a dialog to fill in the PublishDate. The input uses type datetime-local, but this is not supported in Firefox (it's only supported in Chrome and Edge). The input says "03/26/2018 3:01 AM", and I can in fact update it if I use the same format, but that's not a native format to me, so I'm not sure where it's coming from. Perhaps it is a fallback mechanism using php interpretation?

I do notice that it has a hidden field which stores the actual PublishDate, and another field that is visible, so I guess there's javascript going on as well. So my suggestion is to check for browser support for datetime(-local), and if it's not there, separate the date and time into two inputs, and merge them together into the hidden input.

Any case, right now, it is a confusing experience.

@JorisDebonnet JorisDebonnet changed the title DatetimeField not supported in Firefox DatetimeField not supported in Firefox or IE Mar 26, 2018
@dhensby
Copy link
Contributor

dhensby commented Mar 26, 2018

I'm sure this had been raised and/or considered by @chillu and @tractorcow - I can't find the issue now, though

@chillu
Copy link
Member

chillu commented Mar 26, 2018

There's a lot of background discussion on #6626

Firefox has implement HTML5 date and HTML5 time fields, but not datetime (Chrome and Edge have datetime support). I agree that it's an issue, although I was hoping that Firefox simply took some time to catch up with other browsers, but there's been no movement on the bug report in five months...

I think for now, set your i18n.date_format and i18n.time_format to values that your authors can type out (e.g. not am/pm). We've invested weeks of dev time into i18n in SilverStripe 4 already, I don't think this will come up on our backlog soon.

@sminnee sminnee changed the title DatetimeField not supported in Firefox or IE [FORMS] DatetimeField not supported in Firefox or IE Oct 7, 2018
@chillu
Copy link
Member

chillu commented Jan 14, 2019

@bergice Could you check if that's been fixed by your recent work on date fields?

@bergice
Copy link
Contributor

bergice commented Jan 14, 2019

@chillu yes, except it has not been merged yet.

I'm closing this as it duplicates silverstripe/silverstripe-admin#723

@bergice bergice closed this as completed Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants