BUG 9238 "The Date field format changes when you want to edit" SOLVED

- Date fields do not respect the mask defined in the XML when editing
  the field manually
- Now when you edit a date field in a dynaForm respected his mask
This commit is contained in:
Victor Saisa Lopez
2012-06-13 11:37:18 -04:00
parent 3535c8fade
commit a48b84d5ea
2 changed files with 40 additions and 2 deletions

View File

@@ -133,7 +133,9 @@
{elseif ($field->type==='date')}
myForm.aElements[i] = new G_Date(myForm, myForm.element.elements['form[{$name}]'],'{$name}');
myForm.aElements[i].setAttributes({$field->getAttributes()});
myForm.aElements[i].mask = 'yyyy-mm-dd';
if (myForm.aElements[i].mask) {literal}{{/literal}
myForm.aElements[i].mask = dateSetMask(myForm.aElements[i].mask);
{literal}}{/literal}
{$field->attachEvents("myForm.aElements[i].element")}
{elseif ($field->type==='hidden')}
myForm.aElements[i] = new G_Text(myForm, myForm.element.elements['form[{$name}]'],'{$name}');