Posted 26 October 2017, 7:59 pm EST
Hi we updated to version 5.20172.334 a couple weeks ago and we found a bug when entering a 2 digit year into a data control that converts to a 4 digit year. We just fixed the bug in wijmo.js for now but would like you to confirm it is a bug.
The change is in wijmo.js function Globalize.parseDate = function (value, format)
The current version is:
else if (year < 100 && hasFullYear) {
var max = wijmo.isNumber(cal.twoDigitYearMax) ? cal.twoDigitYearMax : 2029;
year += (year + 2000 < max) ? 2000 : 1900;
}
We changed it to this:
else if (year < 100 && !hasFullYear) {
var max = wijmo.isNumber(cal.twoDigitYearMax) ? cal.twoDigitYearMax : 2029;
year += (year + 2000 < max) ? 2000 : 1900;
}
hasFullYear is true for our configuration so we believe the logic is wrong in the current version. This was preventing 2 digit years from converting correctly.
If I don’t hear back on this topic I’ll submit a support ticket.
regards,
Jay Ferguson
Sr Dev .NET\JS\Angular\TS
