Hi @KarenS,
like #1174620: Add new HTML5 FAPI element: email, #1174640: Add new HTML5 FAPI element: number, #1174628: Add new HTML5 FAPI element: search, #1174634: Add new HTML5 FAPI element: telephone and #1174630: Add new HTML5 FAPI element: url we are trying to #1496632: Add new HTML5 FAPI Element : date.
That would be <input type="date" />, for example. We have a date element in core, already, but with select boxes. There are also <input type="datetime" />, <input type="month" />, <input type="week" />, <input type="time" /> and <input type="datetime-local" />.
@tim.plunkett said I could open an issue here, because when attacking this, it would be awesome to profit from the experience with the date module.
From your point of view: Would it make sense to add an HTML5 date widget to core (on FAPI level, first)? If yes: How would we handle dates internally? As timestamps - i.e. integers? As some sort of string - i.e. ISO dates? Arrays - i.e. array('year' => 1999, 'month' => 7, 'day' => 23). The latter is how the current core date element does it.
Cheers, Niklas
Comments
Comment #1
karens commentedWhen we add date to core I anticipate we will be adding date elements to core as well. At least that is what I'm going to propose. There is no easy way to add a date element to core without also adding a date api to manipulate it, which is what we will need to add date fields to core.
We can make this change to the D7 version of date and roll it forward to the 7.3 sandbox where it will automatically get included in the D8 port. It looks like an easy change.