I just set up a Grid with a date column. When I change the culture to eg. danish "da-DK" the value of the date is changed.
Eg. 2012-11-05 is change from "Mon Nov 05 2012 00:00:00 GMT+0100 (Central Europe Standard Time)" to "Tue Dec 20 2011 00:00:00 GMT+0100 (Central Europe Standard Time)"
This is clearly a bug. The date from the data source is in ISO 8601 format (2012-11-05T00:00:00), and even in danish this means 5th November 2012 ;-)
This will reproduce the error:
<div id="grid"></div>
<script src="/kendoui/kendo.web.min.js"> </script>
<script src="/kendoui/cultures/kendo.culture.da-DK.min.js"> </script>
<script>
$(document).ready(function() {
kendo.culture("da-DK");
$("#grid").kendoGrid({
dataSource: {
data: [{ "Date": "2012-11-05T00:00:00" }],
schema: {
model: { fields: { Date: { type: "date" } } }
},
},
columns: [{ field: "Date", width: 200 }
]
});
});
</script>
Eg. 2012-11-05 is change from "Mon Nov 05 2012 00:00:00 GMT+0100 (Central Europe Standard Time)" to "Tue Dec 20 2011 00:00:00 GMT+0100 (Central Europe Standard Time)"
This is clearly a bug. The date from the data source is in ISO 8601 format (2012-11-05T00:00:00), and even in danish this means 5th November 2012 ;-)
This will reproduce the error:
<div id="grid"></div>
<script src="/kendoui/kendo.web.min.js"> </script>
<script src="/kendoui/cultures/kendo.culture.da-DK.min.js"> </script>
<script>
$(document).ready(function() {
kendo.culture("da-DK");
$("#grid").kendoGrid({
dataSource: {
data: [{ "Date": "2012-11-05T00:00:00" }],
schema: {
model: { fields: { Date: { type: "date" } } }
},
},
columns: [{ field: "Date", width: 200 }
]
});
});
</script>