$array = array('start'=>"new Date(".date("Y",strtotime($start_date)).")");
$myJson = json_encode($array);
The returned json is a string, how can i convert the dates to objects? I’m using the jquery calendar plugin and it wants a date object. Thanks!
Send a date string normally with json and then parse it with javascript:
var d = Date.parse("Jul 8, 2005");Reference: http://www.w3schools.com/jsref/jsref_parse.asp