Adjaime / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

date format #146

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. $form->addElement(new PFBC\Element\Date("Date:", "date", array("required" => 
1, "description" => "Date.", "style" => "width: 100px;", "jqueryDateFormat" => 
"yy-mm-dd")));

What do you see instead?
07/15/2011 
What is the expected output? 
2011-07-15

What version of the product are you using? On what operating system?
pfbc2.2-php5.3

Original issue reported on code.google.com by nuno.mr....@gmail.com on 15 Jul 2011 at 2:29

GoogleCodeExporter commented 8 years ago
Try...

$form->addElement(new PFBC\Element\Date("Date:", "date", array(
    "required" => 1,
    "description" => "Date.",
    "style" => "width: 100px;",
    "jQueryOptions" => array(
        "dateFormat" => "yy-mm-dd"
    )
)));

- Andrew

Original comment by ajporterfield@gmail.com on 15 Jul 2011 at 3:13

GoogleCodeExporter commented 8 years ago
solved:

$form->addElement(new PFBC\Element\Date("Date:", "date", array("required" => 1, 
"description" => "Date.", "style" => "width: 100px;", "jqueryOptions" => 
array("dateFormat" => "yy-mm-dd"))));

Original comment by nuno.mr....@gmail.com on 15 Jul 2011 at 3:14