Closed pine3ree closed 8 months ago
There are a couple of solution for this:
shouldShowSeconds
shouldShowSeconds
to false if $pattern['second']
is not set, moving all related parts inside the conditional
https://github.com/laminas/laminas-form/blob/d20ba468fad89a23e68ed679b6b827543e166afa/src/View/Helper/FormDateTimeSelect.php#L132There is also another wrong assumption: https://github.com/laminas/laminas-form/blob/d20ba468fad89a23e68ed679b6b827543e166afa/src/View/Helper/FormDateTimeSelect.php#L137 as in some locales the time part comes before the date part, so assuming the index number for a delimiter makes little sense
The helper assumes that any parsed date-time pattern returns an array with a
second
key: https://github.com/laminas/laminas-form/blob/d20ba468fad89a23e68ed679b6b827543e166afa/src/View/Helper/FormDateTimeSelect.php#L107