function hook_fullcalendar_process_dates_alter in FullCalendar 8
Same name and namespace in other branches
- 8.5 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()
- 8.2 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()
- 8.3 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()
- 8.4 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()
- 7.2 fullcalendar.api.php \hook_fullcalendar_process_dates_alter()
Alter the dates after they're loaded, before they're added for rendering.
Parameters
object $date1: The start date object.
object $date2: The end date object.
array $context: An associative array containing the following key-value pairs:
- instance: The field instance.
- entity: The entity object for this date.
- field: The field info.
File
- ./
fullcalendar.api.php, line 101 - Hooks provided by the FullCalendar module.
Code
function hook_fullcalendar_process_dates_alter(&$date1, &$date2, $context) {
// Always display dates only on one day.
if ($date1
->format(DATETIME_DATE_STORAGE_FORMAT) != $date2
->format(DATETIME_DATE_STORAGE_FORMAT)) {
$date2 = $date1;
}
}