This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.2 » i18n Date validation problem
i18n Date validation problem [message #84569] Sun, 30 August 2009 01:32 Go to next message
roxor972  is currently offline roxor972
Messages: 17
Registered: April 2009
Junior Member
Hi all,

I use the plugin sfJQueryUIPlugin to display a nice widget to select a date according to user's culture in my form.

My problem is when I use French culture, with date format dd/mm/yyy, I get an invalid date error when submitting my form ; with English culture and date format yyyy/mm/dd it's ok. Could someone help me solving this issue ?

Below is the code I use in my form class for my date field
$this->widgetSchema['projet_date_livraison_souhaitee']= new sfWidgetFormDateJQueryUI(array("show_button_panel" => "1", "theme" => "/sfJQueryUIPlugin/css/custom-theme/jquery-ui-1.7.2.custom.css"));
	   $this->widgetSchema['projet_date_livraison_souhaitee']->setAttributes(array('size' => 10));
	   $this->validatorSchema['projet_date_livraison_souhaitee'] = new sfValidatorDate(array('required' => false)); 
	   $this->widgetSchema->setLabel('projet_date_livraison_souhaitee', 'Date de livraison souhaitée');


Thanks for your help.
Cheers

[Updated on: Sun, 30 August 2009 01:33]

Re: i18n Date validation problem [message #84628 is a reply to message #84569 ] Mon, 31 August 2009 13:51 Go to previous messageGo to next message
roxor972  is currently offline roxor972
Messages: 17
Registered: April 2009
Junior Member
Nobody can help me? Sad
Re: i18n Date validation problem [message #84727 is a reply to message #84569 ] Wed, 02 September 2009 16:12 Go to previous messageGo to next message
roxor972  is currently offline roxor972
Messages: 17
Registered: April 2009
Junior Member
Please, could someone help me on that issue? Tell me if you need more detail.
Re: i18n Date validation problem [message #84882 is a reply to message #84569 ] Sat, 05 September 2009 15:05 Go to previous messageGo to next message
roxor972  is currently offline roxor972
Messages: 17
Registered: April 2009
Junior Member
Why do I get no answer ? Confused Sad
Re: i18n Date validation problem [message #85434 is a reply to message #84882 ] Thu, 17 September 2009 11:32 Go to previous messageGo to next message
roxor972  is currently offline roxor972
Messages: 17
Registered: April 2009
Junior Member
Still no answer or any kind of help?
Re: i18n Date validation problem [message #85467 is a reply to message #84569 ] Thu, 17 September 2009 14:48 Go to previous messageGo to next message
cthulhu  is currently offline cthulhu
Messages: 48
Registered: February 2006
Member
This is the worst way to obtain an answer.
Have a look at the sfValidatorDate and its date_format option.

And RTFM too:
http://www.symfony-project.org/forms/1_2/en/B-Validators

[Updated on: Thu, 17 September 2009 14:52]

Re: i18n Date validation problem [message #85563 is a reply to message #84569 ] Sun, 20 September 2009 20:44 Go to previous messageGo to next message
roxor972  is currently offline roxor972
Messages: 17
Registered: April 2009
Junior Member
Hi cthulhu,

Thanks for your answer. I do not understand what's bad in my first post to explain my problem so if you have some advices you're welcome.

I solved my problem by writting a custom validator.

Cheers.
Re: i18n Date validation problem [message #102545 is a reply to message #85563 ] Thu, 15 July 2010 17:44 Go to previous message
prader  is currently offline prader
Messages: 1
Registered: July 2010
Junior Member
Hi roxor972

I have the same problem than you... Sad
can you help me please ?

Cheers.
Previous Topic:Doctrine I18N SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'mid' cannot be null..???
Next Topic:doctrine i18n lang field
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software