Form field default value not working I have an inherited project to which I need to add small form api changes. The changes are to two form fields shown below:

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


This is a bizarre problem as my attempts to set the #value and #default_value for both the start and end fields are not working. 

However, I created the test field and it successfully adds to the form and sets my configured value and default_value.

So, for the start field, I expect to see 1988 as the displayed value but instead that form field displays 1900.
The test field I create meanwhile displays and behaves properly ... go figure.

As it is an inherited project, I wonder if there are other means of configuring a form which I am unaware of ?

UPDATE: 
Thanks to Leymannx for contributing and attempting to help. As per your suggestions, I tried the following but without success:

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


Note: The problem is that both the start and end fields refuse all my efforts to configure the value and default_value. So, for the start field, I expect to see 1988 but instead that form field displays 1900.
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,
];