Make yearOffset to make it usable - Fix I used let - LOL

This commit is contained in:
EThaiZone 2018-02-15 17:17:26 +07:00
parent ed8a1540bb
commit b7be13d75e

View File

@ -1476,7 +1476,7 @@ var datetimepickerFactory = function ($) {
};
_this.str = function () {
let format = options.format;
var format = options.format;
if (options.yearOffset) {
format = format.replace('Y', _this.currentTime.getFullYear() + options.yearOffset);
format = format.replace('y', String(_this.currentTime.getFullYear() + options.yearOffset).substring(2, 4));