Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Mike Bernat's Blog:
CakePHP - Changing the Default Value of a Date-Time Input
Dec 10, 2008 @ 13:54:44

In a recent post to his blog Mike Bernat gives a quick tip on how to change the default value of a data-time input field in a CakePHP application.

Automagically generated date/time input fields normally default to the current date and time. For a couple of reasons, I had to change this to another default value.

His included code shows how to modify the default behavior of the form input field for the date with an array of parameters including the hour, minute and meridian (am/pm) values for the element.

tagged: cakephp datetime form field custom default value

Link:


Trending Topics: