- π«π·France MacSim
@berdir: I confirm the changes in the MR are still needed.
The issue I encountered was that on a form submit containing a
datetime-local
element, I always had an Exception "The date cannot be created from a format."Dateime::valueCallback()
was callinggetHtml5DateFormat<code> which returns <code>DateFormat::load('html_datetime')->getPattern();
fordatetime-local
anddatetime
elements.
But'html_datetime'
(ie.Y-m-d\TH:i:sO
) is not a valid format to pass to\DateTime::createFromFormat()
in the followingtry / catch
block.Perhaps not handled in the most elegant way possible ; the fix I provided was very specific to the
datetime-local
element butdatetime
element might have the same problem.