The datepicker on the event form isn't actually inputting any data. While the actual js works, looks good, does all the front-end things it's supposed to do, it doesn't communicate at all with the app itself.
private function __prepareDatePicker() { // Prepare date picker if ($this->request->action == 'add' || $this->request->action == 'edit_series') { $dateFieldValues = []; if (empty($event['date'])) { $defaultDate = 0; // Today $preselectedDates = '[]'; } else { $dates = explode(',', $event['date']); foreach ($dates as $date) { list($year, $month, $day) = explode('-', $date); if (!isset($defaultDate)) { $defaultDate = "$month/$day/$year"; } $dateFieldValues[] = "$month/$day/$year"; } $datesForJs = []; foreach ($dateFieldValues as $date) { $datesForJs[] = "'".$date."'"; } $datesForJs = implode(',', $datesForJs); $preselectedDates = "[$datesForJs]"; } $this->set([ 'defaultDate' => $defaultDate, 'preselectedDates' => $preselectedDates ]); $event['date'] = implode(',', $dateFieldValues); } elseif ($this->action == 'edit') { list($year, $month, $day) = explode('-', $event['date']); $event['date'] = "$month/$day/$year"; } }
A forethought: this was written in Cake2, initially, so basing all of this off of $event['date'] made sense because $event['date] just represented $this->request->data['Event']['date']. With Cake3, it doesn't do that, and so any form data like that has to be passed back to functions like __prepareDatePicker().
Something to try, then, is passing $event from the add() or edit() actions.