Question: I have this code:

```
<script type="text/javascript">
$(document).ready(function() {
    $('#submit').prop('disabled', true);
    $('#links').change(function() {
        $('#submit').prop('disabled', this.value == "" ? true : false);
    })
});

```

But when the first thing I do when I load the page is rightclick paste and hit the button, the button is disabled.. I need to click 'outside' the text field before I click the button if I want it to work.. is there any way round this? Thanks in advance!

Answer: 
You can use a simple loop of 12 to create a date string for each month, then run that through Twig's date filter like below:

```
{% for month in 1..12 %}
    {% set date = month ~ "/1/2016" %}
    <option value="{{ date|date("m") }}">{{ date|date("F") }}</option>
{% endfor %}

```

This results in the requested format:

```
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>

```

The format can easily be changed using [php's date format options](http://nz2.php.net/manual/en/function.date.php).

TwigFiddle of example [here](http://twigfiddle.com/hy06aq).
The form component actually do it, you just need to set format:

```
$builder->add('birth_date', DateType::class, ['format' => 'ddMMMMyyyy']);

```

The output is:

```
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
...

```