Multiple Date Form Element in Drupal 9

454 Views Asked by At

I am trying to add a multiple date field (unlimited cardinality) in my custom module configuration form.

$form['holidayForm']['holidays'] = [
        '#type' => 'date',
        '#multiple' => TRUE,
        '#title' => $this->t('Holidays'),
        '#default_value' => $config->get('holidayForm.holidays'),
    ];

As you can see, I have added the #multiple property but I still get a single field

enter image description here

Is there a different property that I needed to add.

0

There are 0 best solutions below