New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DateTime Form input: minutes to seconds, 0 to 60, 0 to empty, null to true? #6518
Comments
Fixed in #6519 |
Although second's options have been fixed to be the same of minutes, there is still an issue with the correct value to set for the "second" option key. |
The following works fine for me in a cake3 app. echo $this->Form->input('created', ['second' => []]); Where does the documentation say |
This was mentioned in the original issue ticket. That at the documentation here: http://book.cakephp.org/3.0/en/views/helpers/form.html#creating-date-and-time-inputs It says:
|
Yeah, setting |
Shouldn't be hard to make |
This option should have always worked but was missing test coverage before. Refs #6518
When you enable the Form input type DateTime, and you enable the seconds field, the minutes display 00 to 59, but the seconds display is 01 to 60. It needs to be one, or the other; though 00 makes more sense in general.
Also, documentation here (http://book.cakephp.org/3.0/en/views/helpers/form.html#creating-date-and-time-inputs) says:
But when you attempt to do so, you get a RuntimeException that
Though it seems
null
is the correct answer, nottrue
? Or is this a different invocation path?Also, with the above option, after a form submit, the minute field defaults to the
empty
rather than00
field if the user select exactly3:00:00 PM
. This issue does not occur for the hour, and obviously not for the seconds, since the seconds go from 1 to 60 rather than 0 to 59.The text was updated successfully, but these errors were encountered: