Example #1
0
 function render()
 {
     //$curVal should be in form yyyy-mm-dd(or any other non-numeric delimeter
     //or empty or NULL
     //assumed that the date is completely valid here
     $name = $this->params['originalName'];
     $curVal = $this->formPtr->fields[$name];
     $tmp_date = preg_split('/\\D/', $curVal, -1, PREG_SPLIT_NO_EMPTY);
     if (count($tmp_date) != 3) {
         $tmp_date = array(0, 0, 0);
     }
     $dateOrder = colesoFormControl::formGetDateOrder();
     $l = strlen($dateOrder);
     $res = '';
     for ($i = 0; $i < $l; $i++) {
         $code = $dateOrder[$i];
         if ($i > 0) {
             $res .= '&nbsp;';
         }
         $res .= $this->makeDateElementDropDown($code, $name, $tmp_date);
     }
     $res .= $this->calendarWidget();
     return $res;
 }
 static function formSetYearInterval($yfrom, $yto)
 {
     colesoApplication::setConfigVal('/form/yearList', colesoFormControl::formGetYearHash($yfrom, $yto));
 }