This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Can't show a Datepicker <--> I use symfony 1.2

Forum to discuss ExtJS and other JS plugins

Can't show a Datepicker <--> I use symfony 1.2

by forumsymfony1.2 » Mon Jun 29, 2009 3:48 pm

Hi !

I have a problem to show the date picker, I use the tutorial http://www.lexik.fr/sfblog/symfony/symfony-jquery-datepicker -491 to help me.

So I have link the javascript in the view.yml like the tutorial.

I've create this code in my action.class

Code: Select all
class testActions extends sfActions
{
  public function executeIndex(sfWebRequest $request)
  {
   for($i = 1900; $i<2010; $i++)
   {
     $years[$i] = $i;
   }
   $this->aazza = new sfWidgetFormJQueryI18nDate(
     array('config' => 'yearRange: \'1900:2009\',
                     changeYear: true,
                     changeMonth: true,',
         'culture' => 'fr',
         'years'=> array_combine($years, $years))
     );
  }
}


And this code in my template

Code: Select all
<?php
echo $aazza->render('birthday');
?>


This don't show a date picker, just a simple form to choose the date.

Can you help me !!!!

Did i forgot a use_helper ?
Did i need to include an other Javascript function ?
... ?

Thank you for your help.
forumsymfony1.2
Junior Member
 
Posts: 3
Joined: Mon Jun 29, 2009 3:31 pm

Re: Can't show a Datepicker <--> I use symfony 1.2

by weaverryan » Tue Jun 30, 2009 1:32 pm

Make sure you've already included both the Jquery javascript and Jquery UI javascript libraries already somewhere in your code (there's no "helper" or anything to include these for you - download them and include them manually).

-Ryan
Ryan Weaver - CEO of KnpLabs US
Offering Symfony2 training May 19th & 20th - Nasvhille, TN and June 6th & 7th - New York, NY

http://www.thatsquality.com
@weaverryan
User avatar
weaverryan
Faithful Member
 
Posts: 784
Joined: Sat Nov 10, 2007 1:50 am
Location: Nashville, TN

Re: Can't show a Datepicker <--> I use symfony 1.2

by forumsymfony1.2 » Tue Jun 30, 2009 5:04 pm

Hi !

I have include the both in the view.yml and i download them in /web/js. So does i need to do another include of them in my code?

So there isn't the problem...

Thank you for your help
forumsymfony1.2
Junior Member
 
Posts: 3
Joined: Mon Jun 29, 2009 3:31 pm