Skip to content

Commit da1071a

Browse files
committed
Fix date parsing for all-day events
1 parent 8041cea commit da1071a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_site/assets/scripts/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var Events = {
6565
html += '<li class="event">';
6666
html += '<h4 class="event-title">' + event.summary + '</h4>';
6767
html += '<ul class="event-info">';
68-
date = moment(event.start.dateTime);
68+
date = moment(event.start.dateTime || event.start.date);
6969
html += '<li><i class="fa fa-calendar-o"></i>' + date.format('MMM D \'YY') + '</li>';
7070
// print out time if set
7171
html += (event.start.dateTime === undefined)?'':'<li><i class="fa fa-clock-o"></i>' + date.format('h:mm A') + '</li>';

assets/scripts/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var Events = {
6565
html += '<li class="event">';
6666
html += '<h4 class="event-title">' + event.summary + '</h4>';
6767
html += '<ul class="event-info">';
68-
date = moment(event.start.dateTime);
68+
date = moment(event.start.dateTime || event.start.date);
6969
html += '<li><i class="fa fa-calendar-o"></i>' + date.format('MMM D \'YY') + '</li>';
7070
// print out time if set
7171
html += (event.start.dateTime === undefined)?'':'<li><i class="fa fa-clock-o"></i>' + date.format('h:mm A') + '</li>';

0 commit comments

Comments
 (0)