Jump to content

HTML5 Date field support


Raul
 Share

Recommended Posts

Hello, 

I use the Datetime field in my current project. I have seen, if I select  "no date/time picker", I obtain a standard HTML Inputfield.

Is it possible to obtain a HTML5 Inputfield for date instead of a HTML?

That is:

I obtain <input type="text"  instead of  <input type="data" ...

It would be usefull an option to select the output format in order to make native HTML5 pages.

What code should I change to do it ?

Thanks in advance.

Raul

Link to comment
Share on other sites

Hi diogo, 

Form builder uses this field too, but you can use this filed into a basic page.

Also, it is not only about form builder but in general about Datetime Filed.

Link to comment
Share on other sites

The output format is for the formatting on when you output in templates, has nothing to do with HTML5.

THe inputfield for datefield in HTML is only very partly (chrome) supported and don't think it's a good thing for PW backend as it would inteferer with the native datepicker.

Link to comment
Share on other sites

From my perspective the implementation of the Datetime field should take care about if the native Datepicker is available using a Feature Detection.

See http://diveintohtml5.info/detect.html#input-types

In cases the native datepicker is not available the jquery UI plugin should be assigned. If it is supported leave the plugin assigment.

What do you think?

Thanks in advance

Marcel

Link to comment
Share on other sites

I think that once the HTML5 datepickers across all major browsers reach a level of maturity where they are as good or better than the jQuery UI one, this makes sense. Though how does the HTML5 datepicker support multi-language and various date formats? Currently, we are translating custom date formatting strings between PHP and javascript. Does the HTML5 datepicker support time input too? I guess I have to read up more on the HTML5 date picker, but am wondering if the multi-language aspect especially might present more challenges in HTML5 than javascript. 

Link to comment
Share on other sites

  • 2 weeks later...

Hey Ryan,

the respective language is chosen within the browser like it is chosen for all menu entries. From my point of view this is the best thing which can be done.

Besides, we have the same behaviour with the input type "file". We don't have any access to the text of the button. In English it's "Choose File", in German it's "Durchsuchen".

Regarding the support of the HTML5 datpicker: I would prefer a Graceful Degradation to show that it is important to support those features. We can do it right now. Why should we wait? :)

Regards

Marcel

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...