addOption('convention', '12'); $this->addOption('dropslide', "{trigger: 'focus'}"); $this->addOption('format12', "{h:02.d}:{m:02.d} {suffix:s}"); $this->addOption('format24', "{h:02.d}:{m:02.d}"); $this->addOption('handle', false); $this->addOption('hours', true); $this->addOption('minutes', true); $this->addOption('seconds', false); $this->addOption('prefix', array('am', 'pm')); $this->addOption('suffix', array('am', 'pm')); $this->addOption('rangeMin', array('00', '15', '30', '45')); $this->addOption('rangeSec', array('00', '15', '30', '45')); $this->addOption('updateLive', "true"); $this->addOption('resetOnBlur', "true"); $this->addOption('type', 'text'); $this->setOption('is_hidden', false); } /** * @param string $name The element name * @param string $value The value displayed in this widget * @param array $attributes An array of HTML attributes to be merged with the default HTML attributes * @param array $errors An array of errors for the field * * @return string An HTML tag string * * @see sfWidgetForm */ public function render($name, $value = null, $attributes = array(), $errors = array()) { return "" . $this->renderTag('input', array_merge(array('type' => $this->getOption('type'), 'name' => $name, 'value' => $value), $attributes)); } public function getStylesheets() { return array( '/css/ui.dropslide.css' => 'screen', '/css/ui.timepickr.css' => 'screen' ); } public function getJavaScripts() { return array('/js/jquery.strings.js', '/js/jquery.utils.js', '/js/ui.dropslide.js', '/js/jquery.timepickr.js', '/js/ui.timepickr.js'); } } ?>