Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Input type 'datetime' not working #195

Open
jdewilde opened this issue Dec 20, 2017 · 5 comments
Open

Input type 'datetime' not working #195

jdewilde opened this issue Dec 20, 2017 · 5 comments

Comments

@jdewilde
Copy link

The input type 'datetime' is not working as expecting.

https://stijlgids.stad.gent/components/detail/input-datetime.html

@meirege
Copy link
Contributor

meirege commented Dec 22, 2017

Could you add some more information as to what your are expecting it to do?

@jdewilde
Copy link
Author

Apparently there is no specific datetime input UI behaviour available in the styleguide.
Is it possible to create a specific ui behaviour for input boxes type datetime/date. => Feature request (mail Dieter Blomme 22/12)

@daften
Copy link
Contributor

daften commented Dec 22, 2017

ATM we use the HTML5 elements. The reasoning is that those are fully accessible, which is an important requirement. Custom datetime pickers usually aren't. This means that we follow the browser for styling these elements. I'll ask @delrueba to clarify this further.
To be clear, we can style this, but there are consequences, and we already had made a decision, so we want to make sure we make the right decision when we re-visit this. :)

@delrueba
Copy link
Contributor

The strict view: if there's a HTML element, we should use the HTML element.

  • developing JavaScript datepickers is an accessibility nightmare
  • if we don't follow web standards, how can we blame browsers for not incorporating them?
  • users have certain expectations when it comes to datepickers and should not have to deal with different ones on each website they visit, this makes your site less understandable and less operable. Especially on mobile devices.
  • why include yet another library and decrease performance for something your browser is supposed to be able to do?

However: browser support for input type=date is horrible, so I understand the longing for another implementation and feel like this is a discussion worth having!

Since input type date degrades to type text when it's not supported, my initial proposal would be to rely on correct labelling and front-end validation by use of the pattern attribute.

Some further information about the support and fallback possibilities for input type=date: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date

@daften
Copy link
Contributor

daften commented Jan 25, 2018

@delrueba Action item for this ticket (long-term): document these things in the styleguide itself :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants