So, I have a data source set up like this:
var bdModel = kendo.observable({
bdSource: new kendo.data.DataSource({
offlineStorage: {
getItem: function () {
return dtbd
},
setItem: function () {
}
},
...//transport, etc.
schema: {
data: "Main",
model: {
id: "GUID",
fields: {
GUID: { editable: false, type: "string" },
CompanyName: { validation: { required: true }, type: "string" },
CompanyGUID: { validation: { required: true }, type: "string" },
Description: { validation: { required: true }, type: "string" },
LocationGUID: { type: "string" },
StartDate: { type: "date" },
EndDate: { type: "date" },
UserGUID: { type: "string" },
WorkgroupGUID: { type: "string" },
BusDevStatusGUID: { type: "string" },
EstEndDate: { type: "date" },
EstCloseProbability: { type: "string" },
EstTotalValue: { type: "string" },
BusDevFeeStructureGUID: { type: "string" },
SearchGUID: { type: "string" },
BDCode: { type: "string" },
Login: { type: "string" },
Search: { type: "string" },
LocationName: { type: "string" },
CurrencyGUID: { type: "string" },
}
}
}
}),
});
where dtbd is a local variable retrieved from local storage after being set by a function like so:
var bdview = bdModel.bdSource.view()[0]
var myObj = {};
myObj["GUID"] = bdview.GUID;
myObj["BD"] = bdModel.bdSource.data();
systemvariable.push(myObj);
localStorage.setItem("dtBD", JSON.stringify(systemvariable))
It works great for any string fields, but the dates i'm using for kendo datepicker controls don't load properly. Is there an additional step I need to take somewhere to handle the field types properly?