How do I restrict the date popup to 12 months from start date?
Following Method i used to restrict the date Pop-up to 12 months

$form['set_start_date'] = [
      '#title' =&gt; $this-&gt;t('START DATE '),
      '#type' =&gt; 'date',
      '#attributes' =&gt; array('type'=&gt; 'date', 'min'=&gt; '-12 months', 'max' =&gt; 'now' ),
      '#date_date_format' =&gt; 'd/m/Y',
    ];


 $form['set_end_date'] = [
      '#title' =&gt; $this-&gt;t('END DATE'),
      '#type' =&gt; 'date',
      '#attributes' =&gt; array('type'=&gt; 'date', 'min'=&gt; '-12 months', 'max' =&gt; 'now' ),
      '#date_date_format' =&gt; 'd/m/Y',
    ];


  $form['submit'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; t('Filter'),
    );

 return $form;
}