Ok, I tried the test page and was able to verify the issue. In IE (11.0.9600) I get the expected "04/12/1928" and in Chrome (80) I get "04/11/1928"
However, I just tried changing my timezone to CST and EST and I get the same expected result in both browsers, so it seems to be some timezone issue. If you change your timezone to MST I think you will be able to replicate the issue. If I change to PST I get "04/11/1928" in both browsers. It's only MST (the timezone that the date was serialized in) that the issue exists.
The scenario is a date being serialized by MVC 5 default serializer (System.Web.Helpers) like so:
@Html.Raw(Json.Encode(new DateTime(1928, 4, 12))
This is then passed to a kendo Model/ObservableObject and the web page has a kendo date picker with value binding to the field. Both server and client in MST timezone.
The strange this is that this only affects certain dates and I don't understand why. It's like a 10% chance that chrome shows the previous day. The example below works as expected in both browsers:
Json.Encode(new DateTime(1980, 8, 12))
kendo.toString(kendo.parseDate("\/Date(334908000000)\/"), "MM/dd/yyyy")
I am able to resolve the issue by using Newtonsoft serializer which serializes datetime differently, but am concerned about the data integrity issues that were possibly introduced by this.
Any ideas?
Thanks.