Form field default value not working
I removed all '#value' keys and replaced date('Y') with idate('Y') and for me it's working without any problem. Flush cache!

$form['start'] = [
  '#type' =&gt; 'number',
  '#title' =&gt; t('Between') . ':',
  '#required' =&gt; TRUE,
  '#default_value' =&gt; 1988,
  '#min' =&gt; 1900,
  '#max' =&gt; idate('Y'),
];
$form['test'] = [
  '#type' =&gt; 'number',
  '#title' =&gt; t('TEST') . ':',
  '#required' =&gt; TRUE,
  '#default_value' =&gt; 1988,
  '#max' =&gt; idate('Y'),
  '#min' =&gt; 1900,
];
$form['end'] = [
  '#type' =&gt; 'number',
  '#title' =&gt; t('and'),
  '#required' =&gt; TRUE,
  '#min' =&gt; 1900,
  '#max' =&gt; idate('Y'),
  '#default_value' =&gt; 1999,
];