Do you know any Bundle to use datepicker in Symfony 3?

-1

In previous projects I used the Bundle Genemu and it worked fine now for this version of symfony presents problems to me, here I leave the issue that still has not answer: link

Does anyone work with a Bundle to get it to work with the effects of jquery?

Greetings

    
asked by juanitourquiza 26.05.2017 в 19:44
source

1 answer

0

Researching, I found the solution to this problem. I solved it using the Bundle:

link

It's a Bundle that supports Symfony 3.2.x and has very good documentation

The final code that shows in the form the calendar as I wanted is this:

<?php
// ...
use SC\DatetimepickerBundle\Form\Type\DatetimeType;

public function buildForm(FormBuilder $builder, array $options)
{
$builder

    // full options
    ->add('date', DatetimeType::class, array( 'pickerOptions' =>
        array('format' => 'mm/dd/yyyy',
            'weekStart' => 0,
            'startDate' => date('m/d/Y'), 
            'autoclose' => true,
            'startView' => 'month',
            'minView' => 'month',
            'maxView' => 'decade',
            'todayBtn' => false,
            'todayHighlight' => false,
            'keyboardNavigation' => true,
            'language' => 'es',
            'forceParse' => true,
            'showMeridian' => false,
            ))) ; 

}

Greetings

    
answered by 29.05.2017 / 18:45
source