• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Input type 'datetime'

Mythotical

Well-known member
#1
I am using an input type of date right now but I want to use input type of datetime so users can select the time at the sametime as the date. The field doesn't work, there is no popup so I'm not sure what I'm missing.
 

xfrocks

Well-known member
#2
I am using an input type of date right now but I want to use input type of datetime so users can select the time at the sametime as the date. The field doesn't work, there is no popup so I'm not sure what I'm missing.
You can use <input type="datetime" /> but that will only works in Opera (HTML5 draft). The reason why <input type="date" /> works in XenForo is because XenForo specifically supports it like this

Code:
if ($this.is(':date'))
{
XenForo.create('XenForo.DatePicker', this);
}
 

Mythotical

Well-known member
#3
Gotcha, thanks for the info. I got it working last night by taking an hour and minute input then converting to GMT and inserting into the database.