A calender won't display with firefox

时间:2017-06-15 10:10:07

标签: symfony date firefox calendar twig

I want to display a calender using the code below ,it works fine with google chrome but with Firefox it appear like text field .

How can I resolve this problem I want to display a calender and it does not matter which browser is used.

my buildform:

public function buildForm(FormBuilderInterface $builder, array $options)
{
    $builder
        ->add('startDate', DateType::class, array(
            'widget' => 'single_text',
            // this is actually the default format for single_text
            'format' => 'yyyy-MM-dd'))
        ->add('EndDate', DateType::class, array(
            'widget' => 'single_text',
            // this is actually the default format for single_text
            'format' => 'yyyy-MM-dd'));
}

my twig:

<div>
 {{ form_widget(form.startDate}}
 {{ form_widget(form.EndDate}}   
</div>

0 个答案:

没有答案