the $html->yearOptionTag() supports a minYear and maxYear parameter, but I can't find the same thing for dateTimeOptionTag().

Anyway, you can use the concatenation method shown here http://manual.cakephp.org/chapter/10 (about half way down). To put the "date pieces" into the DATETIME format before save.

If you didn't want to use a dropdown you can always just use a regular text input to have the year entered and then concatenate as shown later.

But in my testing, other than the dateTimeOptionTag problems with the range on years, there is nothing that is stopping me from storing dates below 1970

On 7/21/06, John Zimmerman [gmail] <[EMAIL PROTECTED]> wrote:
So far I am unable to get  $html->dateTimeOptionTag() to display a year below 1946, but I did manually modify the database entry to make the year 1700 and it displays correctly when I view the timestamp output by Cake, but when I go to edit that record the year still stops at 1946.

Anyone have any insight into the dateTimeOptionTag?


On 7/21/06, John Zimmerman [gmail] < [EMAIL PROTECTED] > wrote:
And the webserver is Apache on Debian


On 7/21/06, John Zimmerman [gmail] < [EMAIL PROTECTED]> wrote:
What version of CakePHP are you using?  What version of PHP and MySQL?

I just did a grep on the cake directory and found no reference to mktime().

I then setup a test model/controller/view and used a "DATETIME" MySQL field type.  I scaffolded everything and CakePHP brought up 1946 as the earliest year with no modifications on my part (in a dropdown box).

I am going to test out parameters, but everything saved correctly in 1946 for me.

I am using CakePHP v1.1.6, PHP 5.x, and MySQL 5.x


On 7/21/06, Nick <[EMAIL PROTECTED] > wrote:

How do I link into the existing Cake infrastructure for saving dates?
Where is that specific code, where it's using the mktime function.







--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to