When i do:
$builder->add('submittedAt_min',
'date',
array('widget' => 'single_text', 'label' => 'my label', 'attr' => array('placeholder' => 'my placeholder')));
i get:
<input type="date" placeholder="my placeholder" required="required" name="es_app_filter[submittedAt_min]" id="es_app_filter_submittedAt_min" class="hasDatepicker">
The type is "date"
But when I add format option to field:
$builder->add('submittedAt_min',
'date',
array('format' => 'dd-MM-yyyy', 'widget' => 'single_text', 'label' => 'my label', 'attr' => array('placeholder' => 'my placeholder')));
I get:
<input type="text" placeholder="my placeholder" required="required" name="es_app_filter[submittedAt_min]" id="es_app_filter_submittedAt_min">
the input type is now 'text'.
I do several things in jQuery basing on [type="date"]. When it changes to "text" all my action wont work.
Any ideas why is it this way, how to fix it, any workaround?