How can I disable future dates?
This can be achieved by adding an attribute max

$form['date'] = [
  '#title' =&gt; $this-&gt;t('Date'),
  '#type' =&gt; 'date',
  '#attributes' =&gt; [
    'type' =&gt; 'date',
    'min' =&gt; '-25 years',
    'max' =&gt; 'now',
  ],
  '#date_date_format' =&gt; 'd/m/Y',
];


Reference: https://api.drupal.org/comment/61733#comment-61733