diff --git a/includes/views/fullcalendar.views.inc b/includes/views/fullcalendar.views.inc index c0641b9..7a1f09c 100644 --- a/includes/views/fullcalendar.views.inc +++ b/includes/views/fullcalendar.views.inc @@ -109,9 +109,10 @@ function fullcalendar_views_pre_view(&$view, &$display_id, &$args) { // Add an exposed filter for the date field. $field_value_id = $field->real_field . str_replace($field->field, '', $field_id); if (isset($exposed_input[$field_value_id])) { - $timestamp = (strtotime($exposed_input[$field_value_id]['min']['date']) + strtotime($exposed_input[$field_value_id]['max']['date'])) / 2; - $min = date('Y-m', $timestamp); - $max = date('Y-m', strtotime($min . ' +1 month')); + $exposed = $exposed_input[$field_value_id]; + $min = mktime(0, 0, 0, $exposed['min']['month'], $exposed['min']['day'], $exposed['min']['year']); + $max = mktime(0, 0, 0, $exposed['max']['month'], $exposed['max']['day'], $exposed['max']['year']); + $timestamp = ($min + $max) / 2; } else { $min = date('Y-m', mktime(0, 0, 0, $settings['date']['month'] + 1, 1, $settings['date']['year']));