Wrong date field format in Chrome I am working on a form.

I have this date field:

$form['date'] = [
  '#type' =&gt; 'date',
  '#title' =&gt; $this-&gt;t('Date:'),
  '#attributes' =&gt; [
    'type' =&gt; 'date',
    'placeholder' =&gt; 'dd/mm/aaaa',
    'data-drupal-date-format' =&gt; ['d/m/Y'],
  ],
  '#date_date_format' =&gt; 'd/m/Y'
];


When I set the date to August 30, 2017 I get

Firefox (Excellent!):



Chrome (Wrong!):



How can I set the 'd/m/Y' format in Chrome?
In Drupal 8, the date form element uses the HTML5 date input format by default.  Chrome is one of the browsers that support this.  So, it looks like your browser is using US style dates.

Changing to

$form['date'] = [
  '#type' =&gt; 'date',
  '#title' =&gt; $this-&gt;t('Date:'),
  '#attributes' =&gt; [
    'type' =&gt; 'text', // &lt;=== CHANGE THIS
    'placeholder' =&gt; 'dd/mm/aaaa',
    'data-drupal-date-format' =&gt; ['d/m/Y'],
  ],
  '#date_date_format' =&gt; 'd/m/Y'
];


should work, but I would recommend using a datetime element and configuring it for date-only inputs.  You can also configure that to not use the HTML5 inputs.