Am trying to fetch single date events from SharePoint calendar list with the help of javascript in SharePoint hosted app
var ctx = new SP.ClientContext(appWebUrl);//Get the SharePoint Context object based upon the URL
var myList = ctx.get_web().get_lists().getByTitle("MyList");
function retrieveBookingDetails() {
var Date ="09/01/2016";
var query = new SP.CamlQuery();
query.set_viewXml('<View><Where><eq><FieldRef Name=\'EventDate\'/><Value Type=\'DateTime\'IncludeTimeValue=\'TRUE\' >' + Date + '</Value></eq>" + "</Where></View>');
var items = myList.getItems(query);
ctx.load(items);
);
ctx.executeQueryAsync(onQuerySucceeded, onQueryFailed);
function onQuerySucceeded() {
----
-------
}
function onQueryFailed(sender, args) {
alert('Request failed. ' + args.get_message() +
'\n' + args.get_stackTrace());
}
}
but it returns all events of calendar list,infact it also gives all events without this query
query.set_viewXml('<View><Where><eq><FieldRef Name=\'EventDate\'/><Value Type=\'DateTime\'IncludeTimeValue=\'TRUE\' >' + Date + '</Value></eq>" + "</Where></View>');
so what i suppose to do if i wants to fetch events of any specific date?