Symfony表单生成器日历不会在Firefox上显示

时间:2015-05-19 15:27:43

标签: symfony formbuilder

我写过这个表单构建器表单

$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();

表单显示所有浏览器,但日历不显示在Firefox浏览器中。它在Google Chrome浏览器上完美运行。请任何人帮助并提前感谢您提供任何帮助。

1 个答案:

答案 0 :(得分:1)

firefox dosent将输入日历显示为chrome,但您可以尝试此解决方案:https://stackoverflow.com/a/22987203/4233170