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>