public function configure($options = array(), $attributes = array())
 {
     $this->addOption('date_widget');
     $this->addOption('time_widget');
     $this->addOption('separate_names');
     parent::configure($options, $attributes);
 }
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options = array(), $attributes = array());
     // Option for both
     $this->addOption('ui_show_button_panel', true);
     $this->addOption('theme', sfConfig::get('dm_dmDateTimePickerPlugin_default_theme'));
     $this->addOption('ui_button_open', '');
     $this->addOption('ui_button_clear', '');
     // Date options
     $this->addOption('ui_date_format', dmContext::getInstance()->getServiceContainer()->getService('user')->getCulture());
     $this->addOption('ui_number_of_months', 1);
     $this->addOption('ui_change_month', true);
     $this->addOption('ui_change_year', true);
     $this->addOption('ui_constrain_input', true);
     // Time options
     $this->addOption('ui_time_format', dmContext::getInstance()->getServiceContainer()->getService('user')->getCulture());
     $this->addOption('ui_control_type', 'slider');
     $this->addOption('ui_step_hour', 1);
     $this->addOption('ui_step_minute', 1);
     $this->addOption('ui_step_second', 1);
     $this->addOption('ui_hour_grid', 0);
     $this->addOption('ui_minute_grid', 0);
     $this->addOption('ui_second_grid', 0);
     if (!isset($options['theme'])) {
         $options['theme'] = $this->getOption('theme');
     }
     $this->parseThemeDefaultOptions($options);
 }
 /**
  * Constructor.
  *
  * Available options:
  *
  *  * culture: The culture to use for internationalized strings (required)
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetFormDateTime
  */
 protected function configure($options = array(), $attributes = array())
 {
     parent::configure($options, $attributes);
     $this->addRequiredOption('culture');
     $culture = isset($options['culture']) ? $options['culture'] : 'en';
     // format
     $this->setOption('format', str_replace(array('{0}', '{1}'), array('%time%', '%date%'), sfDateTimeFormatInfo::getInstance($culture)->getDateTimeOrderPattern()));
 }
 /**
  * Configures the current widget.
  *
  * Available options:
  *
  *  * image:       The image path to represent the widget (false by default)
  *  * config:      A JavaScript array that configures the JQuery date widget
  *  * culture:     The user culture
  *  * date_widget: The date widget instance to use as a "base" class
  *
  * @param array $options     An array of options
  * @param array $attributes  An array of default HTML attributes
  *
  * @see sfWidgetForm
  */
 protected function configure($options = array(), $attributes = array())
 {
     $this->addOption('image', false);
     $this->addOption('config', '{}');
     $this->addOption('culture', '');
     $this->addOption('date_widget', new sfWidgetFormDate());
     parent::configure($options, $attributes);
     if ('en' == $this->getOption('culture')) {
         $this->setOption('culture', 'en');
     }
 }