We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fb2872b + e412c35 commit 3636483Copy full SHA for 3636483
src/transforms/date.js
@@ -12,7 +12,11 @@ DS.DjangoDateTransform = DS.Transform.extend({
12
},
13
serialize: function(date) {
14
if (date instanceof Date && date.toString() !== 'Invalid Date') {
15
- return date.toISOString().slice(0, 10);
+ year = date.getFullYear();
16
+ month = date.getMonth() + 1; // getMonth is 0-indexed
17
+ month = month < 10 ? '0' + month : month;
18
+ day = date.getDate();
19
+ return year + '-' + month + '-' + day;
20
} else {
21
return null;
22
}
0 commit comments