1
I don’t know if it’s totally valid for you but you can change the type
of datetime
for datetime-local
, the difference between them is that one has the option to declare the time zone and the other does not.
datetime
: HTML5 A control to enter date and time (hour, minute, second and fraction of second) based on UTC time zone.datetime-local
: HTML5 A control to enter date and time, without time zone.
The type datetime
, do not show the calendar in any browser, even in Chrome, already the datetime-local
opens the calendar in Chrome, but does not have the spindle option.
Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input
See how it looks in Chrome and Firefox
Test yourself
Date / Datetime / Datetime-local<br>
<input type="date" name="" id="">
<input type="datetime" name="" id="">
<input type="datetime-local" name="" id="">
Have you tried separating the date and time in different fields? Have you tested whether the date output is being done correctly by PHP? Depending on the browser, datetiime separates date and time into fields, but note that this varies from implementation to implementation. Important [Edit] the post and provide a [mcve] of the problem and better describe how it tested, remembering that Stack Overflow accepts "executable" snippets of HTML
– Bacco
Either separate as Bacco said because most browsers have it, or you would have to use/create a Picker for it.
– rbz