Parse Date From String In JavaScript

Suppose you have a string representation of a date, e.g. “2015-05-15T22:43:35.0962104+02:00” or “5/15/2015”, and you need to parse that string into a JavaScript Date object. Here’s how to do it:

// Parse string into the number of milliseconds since January 1, 1970, 00:00:00 UTC.
var ticks = Date.parse("5/15/2015");

// Create an instance of Date using the number of milliseconds.
var date = new Date(ticks);

// Check the value of the Date instance 
console.log(date);
// yields "Mon Oct 05 2015 00:00:00 GMT+0200 (W. Europe Daylight Time)"

Handle Clicks On Calendar Items In SharePoint 2010 With JavaScript

In some scenarios, you might want to add extended client behavior to a Calendar View in SharePoint 2010. The client-side API of the Calendar View ist not of a great help in every case here. especially, it does not provide an event or hook to catch clicks on calendar items. 

Fortunately, JavaScript itself is powerful enough to allow us injecting such hooks by ourselves. The trick is just to override the API function SP.UI.ApplicationPages.CalendarContainerFactory.create. We just need to wait until the calendar API is loaded and call a function provided by us:Read More »