diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 9cf275b23..b21f1cfd7 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -4299,7 +4299,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText public $editable; public $onchange; public $renderMode = ''; - public $gridFieldType = ''; + public $gridFieldType = 'date'; /* * Verify the format of a date @@ -4441,7 +4441,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText * @return */ public function __draw_widget ($pID, $value, $owner = '', $inGrid = false) - { + { $startDate = G::replaceDataField( $this->startDate, $owner->values ); $endDate = G::replaceDataField( $this->endDate, $owner->values ); $beforeDate = G::replaceDataField( $this->beforeDate, $owner->values ); @@ -4560,17 +4560,25 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText $Time = "true"; } - //$sizeend = strlen($valueDemo) + 3; $sizeend = $this->size; - + if ($this->required) { $isRequired = '1'; } else { $isRequired = '0'; } - + + if ($inGrid) { + $pmtype = 'pmgridtype="date"'; + } else { + $pmtype = 'pmfieldtype="date"'; + } + if ($this->editable != "0") { - $html = 'NSFieldType() . ' pm:required="' . $isRequired . '" id="' . $pID . '" name="' . $pID . '" pm:mask="' . $mask . '" pm:start="' . $startDate . '" pm:end="' . $endDate . '" pm:time="' . $Time . '" ' . $onchange . ' class="module_app_input___gray" size="' . $sizeend . '" value="' . $value . '" pm:defaultvalue="' . $defaultValue . '" />' . '' . ' ' . '' . '' . ' ' . '' . ''; + $html = ''; + $html .= ''; + $html .= ''; + $html .= ''; } else { $html = '' . '' . ' ' . '' . '' . ' ' . '' . ''; } @@ -4593,9 +4601,9 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText * $html .= ''; * * */ - if ($this->gridFieldType == '') { + /*if ($this->gridFieldType == '') { $html .= $this->renderHint(); - } + }*/ return $html; }