Only add future events

This commit is contained in:
Michael Teeuw 2014-02-28 15:14:57 +01:00
parent b297c99cbd
commit e901b4e7c1

View file

@ -126,7 +126,10 @@ jQuery(document).ready(function($) {
var today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
var days = moment(e.startDate).diff(moment(today), 'days');
eventList.push({'description':e.SUMMARY,'days':days});
//only add fututre events
if (days >= 0) {
eventList.push({'description':e.SUMMARY,'days':days});
}
};
eventList.sort(function(a,b){return a.days-b.days});