src/Extension/Core/Type/DateTimeType.php
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'input' => 'datetime',
            'model_timezone' => null,
            'view_timezone' => null,
            'date_format' => \IntlDateFormatter::MEDIUM,
            'time_format' => \IntlDateFormatter::MEDIUM,
            'calendar' => \IntlDateFormatter::GREGORIAN,
            'format' => null,
        ]);

        $resolver->setAllowedValues('date_format', self::$acceptedFormats);
        $resolver->setAllowedValues('time_format', self::$acceptedFormats);

        $resolver->setAllowedTypes('model_timezone', ['null', 'string']);
        $resolver->setAllowedTypes('view_timezone', ['null', 'string']);
        $resolver->setAllowedTypes('format', ['null', 'string']);
        $resolver->setAllowedTypes('calendar', ['int', 'IntlCalendar']);
        $resolver->setAllowedValues('input', ['string', 'timestamp', 'datetime']);
    }
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefaults([
            'input' => 'datetime',
            'model_timezone' => null,
            'view_timezone' => null,
            'date_format' => \IntlDateFormatter::MEDIUM,
            'time_format' => \IntlDateFormatter::MEDIUM,
            'calendar' => \IntlDateFormatter::GREGORIAN,
            'format' => null,
        ]);

        $resolver->setAllowedValues('date_format', self::$acceptedFormats);
        $resolver->setAllowedValues('time_format', self::$acceptedFormats);

        $resolver->setAllowedTypes('model_timezone', ['null', 'string']);
        $resolver->setAllowedTypes('view_timezone', ['null', 'string']);
        $resolver->setAllowedTypes('format', ['null', 'string']);
        $resolver->setAllowedTypes('calendar', ['int', 'IntlCalendar']);
        $resolver->setAllowedValues('input', ['string', 'timestamp', 'datetime']);
    }
{@inheritdoc}