@ -32,7 +32,7 @@ class CalendarDatePicker extends FormBase {
'#description' => $this->t('Click in box to select date.'),
];
if (count($path_args) == 5) {
if (count($path_args) >= 5) {
$date = date('Y') . '-' . $path_args[4] . '-' . $path_args[5];
$form['date']['#default_value'] = $date;
}