UPDATE: I got it working but I HOPE there is a cleaner/easier way?
Added this to the DataSource to ensure that date fields would be passed as ISO strings.
parameterMap: function (data, type) {
if (type !== "read") {
if (data && data.models && Array.isArray(data.models)) {
// Convert all Date objects to ISO strings
for (var model of data.models) {
for (var [key, value] of Object.entries(model)) {
if (value instanceof Date) {
model[key] = value.toISOString();
}
}
}
}
}
return data;
}