Symfony Form Builder calendar does not show on firefox

偶尔善良 提交于 2020-01-06 14:52:33

问题


I have written this form builder form

$document = new Document();

    $form = $this->createFormBuilder($document)
        ->add('name', 'entity', array(
                'class' => 'ActionaidLrpBundle:Lrp',
                'property' => 'location',
                'required' => false,
                'empty_value' => 'Select Your Location',
                'empty_data' => null,
                'query_builder' => function(EntityRepository $er){
                    return $er->createQueryBuilder('u')
                        ->where("u.status = 'active'");
                },
            ))
        ->add('createdDate', 'date', array(
            'input' => 'datetime',
            'widget' => 'single_text',
            'attr' => array('class'=>'calendar', 'read_only' => true)
        ))
        ->add('file')
        ->add('lrpId', 'entity', array(
                'class' => 'ActionaidLrpBundle:Lrp',
                'property' => 'getLrpIdAndName',
                'required' => false,
                'empty_value' => 'Select Your LRP',
                'empty_data' => null,
                'query_builder' => function(EntityRepository $er){
                    return $er->createQueryBuilder('u')
                        ->where("u.status = 'active'");
                },
        ))
        ->add('Import', 'submit')
        ->getForm();

the form show perfectly for all browser but the calendar not show in firefox browser. It works perfectly on Google Chrome browser. Please anybody help and advance thanks for giving any help.


回答1:


firefox dosent show the input calendar as in chrome but you can try this solution : https://stackoverflow.com/a/22987203/4233170



来源:https://stackoverflow.com/questions/30329899/symfony-form-builder-calendar-does-not-show-on-firefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!