Form/Type/DatetimeType.php
public function configureOptions(OptionsResolver $resolver)
    {
        $configs = $this->options;

        $resolver
            ->setDefaults(array(
                'widget' => 'single_text',
                'format' => function (Options $options, $value) use ($configs) {
                    $pickerOptions = array_merge($configs, $options['pickerOptions']);

                    if ($pickerOptions['formatter'] == 'php'){
                        if (isset($pickerOptions['format'])){
                            return $pickerOptions['format'];
                        } else {
                            return 'mm/dd/yyyy HH:ii';
                        }
                    } elseif ($pickerOptions['formatter'] == 'js'){
                        if (isset($pickerOptions['format'])){
                            return DatetimeType::convertMalotToIntlFormater( $pickerOptions['format'] );
                        } else {
                            return DatetimeType::convertMalotToIntlFormater( 'mm/dd/yyyy HH:ii' );
                        }
                    }
                },
                'pickerOptions' => array(),
            ));
    }
public function configureOptions(OptionsResolver $resolver)
    {
        $configs = $this->options;

        $resolver
            ->setDefaults(array(
                'widget' => 'single_text',
                'format' => function (Options $options, $value) use ($configs) {
                    $pickerOptions = array_merge($configs, $options['pickerOptions']);

                    if ($pickerOptions['formatter'] == 'php'){
                        if (isset($pickerOptions['format'])){
                            return $pickerOptions['format'];
                        } else {
                            return 'mm/dd/yyyy HH:ii';
                        }
                    } elseif ($pickerOptions['formatter'] == 'js'){
                        if (isset($pickerOptions['format'])){
                            return DatetimeType::convertMalotToIntlFormater( $pickerOptions['format'] );
                        } else {
                            return DatetimeType::convertMalotToIntlFormater( 'mm/dd/yyyy HH:ii' );
                        }
                    }
                },
                'pickerOptions' => array(),
            ));
    }
{@inheritdoc}