Form/Type/DatepickerType.php
public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        parent::setDefaultOptions($resolver);
        
        $resolver->setDefaults(array(
            'widget'         => 'single_text',
            'widget_options'  => array(
              'showButtonPanel' => true,
              'changeMonth'=> true, 
              'changeYear'=>  true
            ),
        ));
        
        $resolver->setAllowedValues(array(
            'input'     => array(
                'datetime',
                'string',
                'timestamp',
                'array',
            ),
            'widget'    => array(
                'single_text',
            ),
        ));
        
    }
public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        parent::setDefaultOptions($resolver);
        
        $resolver->setDefaults(array(
            'widget'         => 'single_text',
            'widget_options'  => array(
              'showButtonPanel' => true,
              'changeMonth'=> true, 
              'changeYear'=>  true
            ),
        ));
        
        $resolver->setAllowedValues(array(
            'input'     => array(
                'datetime',
                'string',
                'timestamp',
                'array',
            ),
            'widget'    => array(
                'single_text',
            ),
        ));
        
    }
public function setDefaultOptions ( OptionsResolverInterface $ resolver ) { parent :: setDefaultOptions ( $ resolver ) ; $ resolver -> setDefaults ( array ( 'widget' => 'single_text' , 'widget_options' => array ( 'showButtonPanel' => true , 'changeMonth' => true , 'changeYear' => true ) , ) ) ; $ resolver -> setAllowedValues ( array ( 'input' => array ( 'datetime' , 'string' , 'timestamp' , 'array' , ) , 'widget' => array ( 'single_text' , ) , ) ) ; }
{@inheritdoc}
{