<p dir="auto">When I specify a date pattern like this :</p>
<code class="notranslate">
-&gt;add('h4', 'date', array(  'label'     =&gt;  'Date of bird',
                                'widget'    =&gt;  'choice',
                                'pattern'   =&gt;  '{{ day }}/{{ month }}/{{ year }}',
</code>
the result isn't Day/Month/Year but Year-Month-Day.
<p dir="auto">In the form_div_layout.html.twig, the block date_widget use "date_pattern" and not "pattern". So, I changed "date_pattern" to "pattern" and now I have the good result Day/Month/Year.</p>
<code class="notranslate">
{% block date_widget %}
{% spaceless %}
    {% if widget == 'single_text' %}
        {{ block('field_widget') }}
    {% else %}
        <div dir="auto">
            {{ date_pattern|replace({
                '{{ year }}':  form_widget(form.year),
                '{{ month }}': form_widget(form.month),
                '{{ day }}':   form_widget(form.day),
            })|raw }}
        </div>
    {% endif %}
{% endspaceless %}
{% endblock date_widget %}
</code>
<p dir="auto">to</p>
<code class="notranslate">
{% block date_widget %}
{% spaceless %}
    {% if widget == 'single_text' %}
        {{ block('field_widget') }}
    {% else %}
        <div dir="auto">
            {{ pattern|replace({
                '{{ year }}':  form_widget(form.year),
                '{{ month }}': form_widget(form.month),
                '{{ day }}':   form_widget(form.day),
            })|raw }}
        </div>
    {% endif %}
{% endspaceless %}
{% endblock date_widget %}
</code>
<p dir="auto">I don't know if this bug was fixed and if my solution is the good.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#Customer.php

class Customer {
# (...)

   /**
    * @var string $phone
    * @Assert\NotBlank()
    * @Assert\Regex(&quot;/^\(\d{2}\) \d{4}-\d{4}$/&quot;)
    * @ORM\Column(name=&quot;phone&quot;, type=&quot;string&quot;, length=14)
    */
   private $phone;

# (...)
}"><pre class="notranslate"><span class="pl-c">#Customer.php</span>

<span class="pl-k">class</span> <span class="pl-v">Customer</span> {
<span class="pl-c"># (...)</span>

   <span class="pl-c">/**</span>
<span class="pl-c">    * @var string $phone</span>
<span class="pl-c">    * @Assert\NotBlank()</span>
<span class="pl-c">    * @Assert\Regex("/^\(\d{2}\) \d{4}-\d{4}$/")</span>
<span class="pl-c">    * @ORM\Column(name="phone", type="string", length=14)</span>
<span class="pl-c">    */</span>
   <span class="pl-k">private</span> <span class="pl-c1"><span class="pl-c1">$</span>phone</span>;

<span class="pl-c"># (...)</span>
}</pre></div>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#CustomerType.php

class CustomerType extends AbstractType
{
# (...)
   public function buildForm(FormBuilder $builder, array $options)
   {
       $builder
           -&gt;add('phone', null, array('label' =&gt; 'Telefone'))
       ;
   }
# (...)
}"><pre class="notranslate"><span class="pl-c">#CustomerType.php</span>

<span class="pl-k">class</span> <span class="pl-v">CustomerType</span> <span class="pl-k">extends</span> <span class="pl-v">AbstractType</span>
{
<span class="pl-c"># (...)</span>
   <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">buildForm</span>(<span class="pl-smi"><span class="pl-smi">FormBuilder</span></span> <span class="pl-s1"><span class="pl-c1">$</span>builder</span>, <span class="pl-smi">array</span> <span class="pl-s1"><span class="pl-c1">$</span>options</span>)
   {
       <span class="pl-s1"><span class="pl-c1">$</span>builder</span>
           -&gt;<span class="pl-en">add</span>(<span class="pl-s">'phone'</span>, <span class="pl-c1">null</span>, <span class="pl-en">array</span>(<span class="pl-s">'label'</span> =&gt; <span class="pl-s">'Telefone'</span>))
       ;
   }
<span class="pl-c"># (...)</span>
}</pre></div>
<p dir="auto">HTML Result:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;input type=&quot;text&quot; id=&quot;paggy_admin_customer_phone&quot; name=&quot;paggy_admin_customer[phone]&quot; required=&quot;required&quot; maxlength=&quot;14&quot; class=&quot;input-text&quot;&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">text</span>" <span class="pl-c1">id</span>="<span class="pl-s">paggy_admin_customer_phone</span>" <span class="pl-c1">name</span>="<span class="pl-s">paggy_admin_customer[phone]</span>" <span class="pl-c1">required</span>="<span class="pl-s">required</span>" <span class="pl-c1">maxlength</span>="<span class="pl-s">14</span>" <span class="pl-c1">class</span>="<span class="pl-s">input-text</span>"<span class="pl-kos">&gt;</span></pre></div>
<p dir="auto"><em>Workaround:</em> If I add the "pattern" property, duplicating the code of entity, it works as expected:</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#CustomerType.php

class CustomerType extends AbstractType
{
# (...)
   public function buildForm(FormBuilder $builder, array $options)
   {
       $builder
           -&gt;-&gt;add('phone', 'text', array('label' =&gt; 'Telefone', 'pattern' =&gt; '^\
(\d{2}\) \d{4}-\d{4}$'))
       ;
   }
# (...)
}"><pre class="notranslate"><span class="pl-c">#CustomerType.php</span>

<span class="pl-k">class</span> <span class="pl-v">CustomerType</span> <span class="pl-k">extends</span> <span class="pl-v">AbstractType</span>
{
<span class="pl-c"># (...)</span>
   <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">buildForm</span>(<span class="pl-smi"><span class="pl-smi">FormBuilder</span></span> <span class="pl-s1"><span class="pl-c1">$</span>builder</span>, <span class="pl-smi">array</span> <span class="pl-s1"><span class="pl-c1">$</span>options</span>)
   {
       <span class="pl-s1"><span class="pl-c1">$</span>builder</span>
           -&gt;-&gt;<span class="pl-en">add</span>(<span class="pl-s">'phone'</span>, <span class="pl-s">'text'</span>, <span class="pl-en">array</span>(<span class="pl-s">'label'</span> =&gt; <span class="pl-s">'Telefone'</span>, <span class="pl-s">'pattern'</span> =&gt; <span class="pl-s">'^\</span>
<span class="pl-s">(\d{2}\) \d{4}-\d{4}$'</span>))
       ;
   }
<span class="pl-c"># (...)</span>
}</pre></div>
<p dir="auto">HTML Result:</p>
<div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;input type=&quot;text&quot; id=&quot;paggy_admin_customer_phone&quot; name=&quot;paggy_admin_customer[phone]&quot; required=&quot;required&quot; maxlength=&quot;14&quot; pattern=&quot;^\(\d{2}\) \d{4}-\d{4}$&quot; class=&quot;input-text&quot;&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span>="<span class="pl-s">text</span>" <span class="pl-c1">id</span>="<span class="pl-s">paggy_admin_customer_phone</span>" <span class="pl-c1">name</span>="<span class="pl-s">paggy_admin_customer[phone]</span>" <span class="pl-c1">required</span>="<span class="pl-s">required</span>" <span class="pl-c1">maxlength</span>="<span class="pl-s">14</span>" <span class="pl-c1">pattern</span>="<span class="pl-s">^\(\d{2}\) \d{4}-\d{4}$</span>" <span class="pl-c1">class</span>="<span class="pl-s">input-text</span>"<span class="pl-kos">&gt;</span></pre></div>
<p dir="auto">Thanks!</p>