protected function getClientScriptOptions()
{
$control = $this->getValidationTarget();
$options['ID'] = $this->getClientID();
$options['FormID'] = $this->getPage()->getForm()->getClientID();
$options['Display'] = $this->getDisplay();
$options['ErrorMessage'] = $this->getErrorMessage();
if ($this->getFocusOnError()) {
$options['FocusOnError'] = $this->getFocusOnError();
$options['FocusElementID'] = $this->getFocusElementID();
}
$options['ValidationGroup'] = $this->getValidationGroup();
if ($control) {
$options['ControlToValidate'] = $control->getClientID();
}
$options['ControlCssClass'] = $this->getControlCssClass();
$options['ControlType'] = $this->getClientControlClass($control);
$options['Enabled'] = $this->getEnabled(true);
//get date format from date picker target control
if ($control instanceof TDatePicker) {
$options['DateFormat'] = $control->getDateFormat();
}
$options = array_merge($options, $this->getClientSide()->getOptions()->toArray());
return $options;
}