/** * Loads user input data. Override parent implementation, when InputMode * is DropDownList call getDateFromPostData to get date data. * This method is primarly used by framework developers. * @param string the key that can be used to retrieve data from the input data collection * @param array the input data collection * @return boolean whether the data of the component has been changed */ public function loadPostData($key, $values) { if ($this->getInputMode() == TDatePickerInputMode::TextBox) { return parent::loadPostData($key, $values); } $value = $this->getDateFromPostData($key, $values); if (!$this->getReadOnly() && $this->getText() !== $value) { $this->setText($value); return true; } else { return false; } }