Hello,
I have some data to display in a grid. The data looks like this:
[{“gid”:1,”tpd”:{“date”:”2015-09-09 00:00:00″,”timezone_type”:3,”timezone”:”UTC”},”tpt”:”Interim Treatment plan”,”tps”:{“date”:”2015-09-14 00:00:00″,”timezone_type”:3,”timezone”:”UTC”},”goal”:”Test goal to verify goals functionality”,”reachdt”:”10\/31\/2015″}]
This is encapsulated in a source and data adapter with this code:
var clientGoalsSource = {
datatype: “json”,
datafields: [{name: “gid”, type: “int”},
{name: “tpd”, type: “date”},
{name: “tpt”, type: “string”},
{name: “tps”, map: “tps>date”, type: “date”, format: “yyyy-MM-dd”},
{name: “goal”, type: “string”},
{name: “reachdt”, type: “string”}],
url: “data/clientgoals_json.php”
};
var dAdapterClientGoals = new $.jqx.dataAdapter(clientGoalsSource);
My problem is that the format string appears to be ignored: The grid displays “Mon Sep 14 2015 00:00:00 GMT-0800 (Alaska Daylight Time)” regardless of the format string in there. My guess is that it’s not really seen as a date? But I am clueless as to how to cause that data to be seen as a date. Please show me how to get there from here.
Thank you!