protected function renderClientControlScript($writer)
{
$cs = $this->getPage()->getClientScript();
if (!$cs->isEndScriptRegistered('TDatePicker.spacer')) {
$spacer = $this->getAssetUrl('spacer.gif');
$code = "Prado.WebUI.TDatePicker.spacer = '{$spacer}';";
$cs->registerEndScript('TDatePicker.spacer', $code);
}
$options = TJavaScript::encode($this->getDatePickerOptions());
$code = "new Prado.WebUI.TActiveDatePicker({$options});";
$cs->registerEndScript("prado:" . $this->getClientID(), $code);
}