Jquery Datepicker Issues with adding events
<p>I am trying to make a date picker with a bunch of events that I pull from an rss feed. To make the datepicker I pretty much copy this post: <a href="http://stackoverflow.com/questions/5578259/jquery-ui-datepicker-how-to-add-clickable-events-on-particular-dates">jQuery UI Datepicker : how to add clickable events on particular dates ?</a></p>

<p>The issue I am having is that I keep getting the error <code>event.Date is undefined</code>. I think this may be because of how I am passing in the dates. The dates come from a collection of strings on page load, that are converted like this: </p>

<pre><code>//Convert objects
currentEventInformationString = JsonConvert.SerializeObject(currentStoreEventInformation);
eventDatesString = JsonConvert.SerializeObject(storeEventDates);
</code></pre>

<p>Where currentEventInformationString is a collection of strings containing a title, description, and link and eventDateString is a collection of strings that are dates (I get it from a method that returns <code>date.ToShortDateString();</code></p>

<p>I then add all of my dates to an event array like so (in js):</p>

<pre><code>//Adds each event to the date picker
for (var x = 0; x &lt; eventDates.length; x++) {
    //Adds event
    events[x] = [{ Title: currentEvents[x].title.toString(), Date: new Date(eventDates[x].toString()) }];
}
</code></pre>

<p>I have then tried running a <code>console.debug(events[x].Title + " " + events[x].Date);</code> but every time I <code>undefined undefined</code></p>

<p>When I run a debug like this:
 <code>console.debug(currentEvents[x].title.toString() + " " + eventDates[x].toString());</code>
I get the correct values so I know that that is not the issue. 
Any suggestions?</p>

<p>Also: I know that the question seems vague so I tried to include as much sample code as I thought was relevant. If you need more let me know. To see how the date picker is made look at the link.</p>

<p><strong>Edit</strong> Here is how I declare events:</p>

<pre><code>//Current event
var events = new Array(eventDates.length);
</code></pre>
