I want to return the events in an Event Calendar for the current week for a web page. I would prefer the current week Friday through Sunday, but that seemed too complicated.
When I use this code it returns events starting approximately 1 week from now and it's showing some events two months from now. I've tried using Week instead of the offset days and that didn't return anything. Would be happy just to get today + next seven days events. Any insight into this would be greatly appreciated. Please see query:
function getMyListData()
{
var method = "GetListItems";
var webURL = $().SPServices.SPGetCurrentSite() ;
var list = "Events Calendar";
var fieldsToRead = "<ViewFields>"+"<FieldRef Name='Name' />" +"</ViewFields>";
var query = "<Query><Where><Geq><FieldRef Name='EventDate' /><Value IncludeTimeValue='TRUE' Type='DateTime'><Today OffsetDays='7' /></Value></Geq></Where><OrderBy><FieldRef Name='EventDate' Ascending='True' /> </OrderBy></Query>";