Form/Type/DatetimeType.php
public function buildView(FormView $view, FormInterface $form, array $options)
    {
        $pickerOptions = array_merge($this->options, $options['pickerOptions']);

        //Set automatically the language
        if(!isset($pickerOptions['language']))
            $pickerOptions['language'] = \Locale::getDefault();
        if($pickerOptions['language'] == 'en')
            unset($pickerOptions['language']);

        //Set the defaut format of malot.fr/bootstrap-datetimepicker
        if(!isset($pickerOptions['format']))
            $pickerOptions['format'] = 'mm/dd/yyyy HH:ii';

        if ($pickerOptions['formatter'] == 'php'){
            $pickerOptions['format'] = DatetimeType::convertIntlFormaterToMalot( $pickerOptions['format'] );
        }

        $view->vars = array_replace($view->vars, array(
            'pickerOptions' => $pickerOptions,
        ));
    }
public function buildView(FormView $view, FormInterface $form, array $options)
    {
        $pickerOptions = array_merge($this->options, $options['pickerOptions']);

        //Set automatically the language
        if(!isset($pickerOptions['language']))
            $pickerOptions['language'] = \Locale::getDefault();
        if($pickerOptions['language'] == 'en')
            unset($pickerOptions['language']);

        //Set the defaut format of malot.fr/bootstrap-datetimepicker
        if(!isset($pickerOptions['format']))
            $pickerOptions['format'] = 'mm/dd/yyyy HH:ii';

        if ($pickerOptions['formatter'] == 'php'){
            $pickerOptions['format'] = DatetimeType::convertIntlFormaterToMalot( $pickerOptions['format'] );
        }

        $view->vars = array_replace($view->vars, array(
            'pickerOptions' => $pickerOptions,
        ));
    }
{@inheritdoc}