Re: Problem with DATE.
Using the form-helper, change the input for the date to: $form->input('date', array('minYear' => 1950)). When the input is for something like a birthday, you can also add a 'maxYear' => 2000 or something to that last array since obviously nobody born in 2029 will be using your site now. :) On 29 okt, 05:45, Jiru wrote: > Hii Programmers , > > In cakephp when I use DATE field it displays the dropdown list with > year limit 1989-2029 how can we get the date from 1950? > > regards, > jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with DATE.
Hello, Please,next time support your question with your code. The attribute you need is 'minYear', please check out the manual and API to get more information: http://book.cakephp.org/view/189/Automagic-Form-Elements#options-minYear-options-maxYear-480 http://api.cakephp.org/class/form-helper#method-FormHelperyear On Oct 29, 5:45 am, Jiru wrote: > Hii Programmers , > > In cakephp when I use DATE field it displays the dropdown list with > year limit 1989-2029 how can we get the date from 1950? > > regards, > jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem with DATE.
Hii Programmers , In cakephp when I use DATE field it displays the dropdown list with year limit 1989-2029 how can we get the date from 1950? regards, jiru --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problem with date() and $form->input() when type => date
thanks dragonl. but i think that this problem shuld be solved in cakephp libs. cakephp should have any way to solve this. if there is no way, i try with other librarys. i`ll see the yours but i think this is a commom problem and is strange that i cant do bithrday select with date prior to 1970. thanks :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problem with date() and $form->input() when type => date
Here's something you should look at "ADOdb Date Time Library", http://phplens.com/phpeverywhere/adodb_date_library. "PHP native date functions use integer timestamps for computations. Because of this, dates are restricted to the years 1901-2038 on Unix and 1970-2038 on Windows due to integer overflow for dates beyond those years. This library overcomes these limitations by replacing the native function's signed integers (normally 32-bits) with PHP floating point numbers (normally 64-bits)." I used it for non-cake project and it works. You can use dates from 100 A.D. to 3000 A.D! On Aug 28, 1:09 pm, ivancasta <[EMAIL PROTECTED]> wrote: > i forgot say > the warning only apperar when the birthday stored is prior to 1970 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problem with date() and $form->input() when type => date
i forgot say the warning only apperar when the birthday stored is prior to 1970 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
problem with date() and $form->input() when type => date
hi all: i use cakephp 1.2.0.5427alpha i want to do a simply select tags to the user in my register page submit the day of birthday. this selects tags are created by cakephp automatically when a use the $form->input('model.field',array('type'=>'date')) in the database the birthday field is DATE type in the add view all perfectly works and all data store well in database but when i render the edit view, when cake php fetch the date of birthday to populate the birthday form field, i get this warnings.; Warning (2): date() [function.date]: Windows does not support dates prior to midnight (00:00:00), January 1, 1970 [CORE\cake\libs\view \helpers\form.php, line 1087] Warning (2): date() [function.date]: Windows does not support dates prior to midnight (00:00:00), January 1, 1970 [CORE\cake\libs\view \helpers\form.php, line 1030] Warning (2): date() [function.date]: Windows does not support dates prior to midnight (00:00:00), January 1, 1970 [CORE\cake\libs\view \helpers\form.php, line 1061] and the field of form dont populate with the database value. this is my code an i relly dont know why doesnt work!! look simple but i cant. somebody help me? Other problem is that i cant do use the DMY date format. create('Usuario');?> Edit Usuario input('id'); echo $form->input('nombre'); echo $form->input('apellidos'); echo $form->input('telefono'); echo $form->input('fax'); echo $form->input('email'); echo $form->input('password'); echo $form->input('password_confirm',array('type' => 'password','value'=>$form->value('Usuario.password'))); echo $form->input('genero',array('type'=>'select','style'=>'width: 125px;', 'selected'=>$form->value('Usuario.genero'), 'options'=> array( "0" =>__('Mujer', true),"1"=>__('Hombre', true; echo $form->input('fecha_nac', array('type' => 'date', 'label' => '', 'empty' => false, 'minYear' => date('Y')-100, 'maxYear' => date('Y'), 'dateFormat' => 'MDY')); // this is the problem echo $form->input('pais_id'); echo $form->input('ciudad'); echo $form->input('provincia'); echo $form->input('created',array('type' => 'hidden')); //echo $form->input('modified',array('type' => 'hidden')); ?> end('Submit');?> //controller function edit($id = null) { if(!$id && empty($this->data)) { $this->Session->setFlash('Invalid Usuario'); $this->redirect(array('action'=>'index'), null, true); } if(!empty($this->data)) { $this->cleanUpFields(); if($this->Usuario->save($this->data)) { $this->Session->setFlash('The Usuario saved'); $this->redirect(array('action'=>'index'), null, true); } else { $this->Session->setFlash('The Usuario could not be saved. Please, try again.'); } } if(empty($this->data)) { $this->data = $this->Usuario->read(null, $id); } $paises = $this->Usuario->Pais->generateList(); $this->set(compact('paises')); } i'll thanks any help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
1.2 using scaffolding, problem with date fields in view
Hi All, Probably a basic question, but I could not find anything in the archives nor on google. I am using scaffolding with a model that has some date fields in the database. Using 1.1 it displayed a '-00-00' date in the db as an 'empty' date. But now, using 1.2, it persists on 1st January 1987. I want to be able to let the user choose no date. Any pointers? Thanks, Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problem with date format
maybe try the dateTimeOptionTag in Html helper, it prints 3 select box or if you use the new Form helper, $form->input will print date select box if your DB field is DATETIME or like On 14 fév, 14:12, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 2/14/07, vidya <[EMAIL PROTECTED]> wrote: > > > > > Hai, > > > I have echo $html->input('Project/start_date') statement to enter the > > date. I can't save the date unless it is entered in the format "- > > mm-dd". Please help me to solve this problem. > > > Thanks, > > Vidya. > > Why can't you alter the date before you save it? > > -- > Chris Hartjes > > My motto for 2007: "Just build it, damnit!" > > rallyhat.com - digital photo scavenger hunt > @TheBallpark -http://www.littlehart.net/attheballpark > @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problem with date format
On 2/14/07, vidya <[EMAIL PROTECTED]> wrote: > > Hai, > > I have echo $html->input('Project/start_date') statement to enter the > date. I can't save the date unless it is entered in the format "- > mm-dd". Please help me to solve this problem. > > Thanks, > Vidya. Why can't you alter the date before you save it? -- Chris Hartjes My motto for 2007: "Just build it, damnit!" rallyhat.com - digital photo scavenger hunt @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
problem with date format
Hai, I have echo $html->input('Project/start_date') statement to enter the date. I can't save the date unless it is entered in the format "- mm-dd". Please help me to solve this problem. Thanks, Vidya. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---