You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a list and form, in both case I render the value of date field as is, I expect the date field only render the date, but I got the date and time, the hour is not saved in DB because the field is type date.
echo$entity->date
Expected: 05/26/2014
Result: 05/26/2014 5:13 PM
In the form I'm using a text input for the date, in order to use jquery datepicker instead of three inputs. Using cake default inputs the inputs are ok without time.
Another related problem , if I use the cake default inputs, for day, month and year then the submit is black-holed
The text was updated successfully, but these errors were encountered:
This happens because CakePHP maps all date, datetime, and timestamp columns to native PHP Datetime objects which always have a time component. It might be possible to have the ORM use a different object, or indicate to the created object that it should not format the time segments.
Another related problem , if I use the cake default inputs, for day, month and year then the submit is black-holed.
I'll look into this as that should not be happening.
I don't think it would be crazy to have a Date object to represent date columns. The object would inherit from Time and would override the display functions to avoid this problem. I consider this just an annoyance and not a real problem, so it will be down in my priority list. If anyone wats to take stab on it, please do :)
I have a list and form, in both case I render the value of date field as is, I expect the date field only render the date, but I got the date and time, the hour is not saved in DB because the field is type date.
Expected: 05/26/2014
Result: 05/26/2014 5:13 PM
In the form I'm using a text input for the date, in order to use jquery datepicker instead of three inputs. Using cake default inputs the inputs are ok without time.
Another related problem , if I use the cake default inputs, for day, month and year then the submit is black-holed
The text was updated successfully, but these errors were encountered: