fixed calendar from extra user field - partial DT#5496

skala
Cristian Fasanando 15 years ago
parent 9c712d427c
commit 7a88b575e2
  1. 9
      main/inc/lib/formvalidator/Element/tbl_change.js.php
  2. 4
      main/inc/lib/formvalidator/FormValidator.class.php

@ -174,12 +174,13 @@ function returnDate(d,m,y) {
window.close();
}
}
datevalues[0].selectedIndex = (d-1);
datevalues[0].selectedIndex = (d-1) ;
datevalues[1].selectedIndex = m;
date = new Date();
year = date.getFullYear();
year = (year-7);
datevalues[2].selectedIndex = (y-year);
year = 1900;
datevalues[2].selectedIndex = (y-year);
for(i = 0; i<= 3; i++)
{
attributes = datevalues[i].attributes;

@ -199,6 +199,7 @@ EOT;
function add_datepicker($name,$label)
{
$this->addElement('datepicker', $name, $label, array ('form_name' => $this->getAttribute('name')));
$this->_elements[$this->_elementIndex[$name]]->setLocalOption('minYear', 1900);
$this->addRule($name, get_lang('InvalidDate'), 'date');
}
@ -210,7 +211,8 @@ EOT;
*/
function add_datepickerdate($name,$label)
{
$this->addElement('datepickerdate', $name, $label, array ('form_name' => $this->getAttribute('name')));
$this->addElement('datepickerdate', $name, $label, array ('form_name' => $this->getAttribute('name')));
$this->_elements[$this->_elementIndex[$name]]->setLocalOption('minYear', 1900);
$this->addRule($name, get_lang('InvalidDate'), 'date');
}

Loading…
Cancel
Save