genemu / GenemuFormBundle

Extra Form : Captcha GD, Tinymce, Recaptcha, JQueryDate, JQueryAutocomplete, JQuerySlider, JQueryFile, JQueryImage
587 stars 263 forks source link

How to configure a DatePicker #306

Open jcrombez opened 10 years ago

jcrombez commented 10 years ago

How am i supposed to configure a datepicker ?

For example :

        {% if configs.buttonImage is defined %}
            {% set configs = configs|merge({
                "buttonImage": asset(configs.buttonImage)
            }) %}
        {% endif %}

Where does "configs" come from ?

rpagliuca commented 10 years ago

I don't know if that's what you were asking, but I had to customize DatePicker as well, and that's what I end up doing:

File: app/config/config.yml

genemu_form:
    date: 
        enabled: true
        configs:
            changeYear: true

Besides changeYear, other available configurations are listed in http://api.jqueryui.com/datepicker/.