jQuery Event Calendar with PHP

jQuery Event Calendar with PHP

Hi All,

I am trying to integrate jQuery calendar with my php site. I had added code to insert and pull back calendar details to and from mysql DB. Now my issue is I am using this code to get event details,
return $.get('./calendar.php?action=get_events&startD='+start+'&endD='+end);

calendar.php page is retrieving details from DB using start and end values and returning in this format,

return '{events : [{"id":1,"start": new Date(2010, 10, 22, 12, 30, 00),"end": new Date(2010, 10, 22, 13, 30, 00),"title":"Meeting with Mark"}]};';

This is not displaying the data in the calendar. If I try the code like this in js file,


return {events : [{"id":1,"start": new Date(2010, 10, 22, 12, 30, 00),"end": new Date(2010, 10, 22, 13, 30, 00),"title":"Meeting with Mark"}]};
instead of return $.get('./calendar.php?action=get_events&startD='+start+'&endD='+end); it will work.

Please help to fix this issue. Really appreciate your support. Thanks