File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
blocks/event-info/components Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,12 @@ const DateTimeGroupNew = ({
8282 return ;
8383 }
8484
85- const newDate =
86- tempEventDate ||
87- ( isStartChange ? eventStart : eventEnd ) ;
88- const newTime =
89- tempEventTime ||
90- ( isStartChange ? eventStart : eventEnd ) ;
85+ // Get the full date time instance from either temp date or time.
86+ const dateInstance = tempEventDate ? tempEventDate : tempEventTime ;
87+
88+ // Set the new date and time based on what was changed.
89+ const newDate = tempEventDate || dateInstance || ( isStartChange ? eventStart : eventEnd ) ;
90+ const newTime = tempEventTime || dateInstance || ( isStartChange ? eventStart : eventEnd ) ;
9191
9292 // Combine the new date and time and convert to a timestamp.
9393 const newDateTime = getTimestamp (
Original file line number Diff line number Diff line change @@ -675,8 +675,8 @@ public function render_single_date( $event_date ) {
675675 // For all day events, just show the date (or date range if different days).
676676 if ( ! $ same_day ) {
677677 $ output .= ' – ' . $ end_date . ' ' . SE_Settings::get_all_day_message ();
678- } else {
679- $ output .= ' ' . SE_Settings::get_all_day_message ();
678+ } elseif ( ! $ this -> date_only ) {
679+ $ output .= ' ' . SE_Settings::get_all_day_message ();
680680 }
681681 } elseif ( $ same_day ) {
682682 // Same day event with times.
@@ -703,7 +703,7 @@ public function render_single_date( $event_date ) {
703703 }
704704
705705 // Add timezone if the option is set.
706- if ( $ this ->display_timezone ) {
706+ if ( $ this ->display_timezone && ! $ this -> time_only && ! $ is_all_day ) {
707707 $ output .= ' ( ' . $ this ->get_timezone_abbreviation () . ') ' ;
708708 }
709709
You can’t perform that action at this time.
0 commit comments