assets/js/romo/datepicker.js in romo-0.16.1 vs assets/js/romo/datepicker.js in romo-0.16.2

- old
+ new

@@ -16,11 +16,11 @@ this.defaultIndicatorClass = undefined; this.defaultIndicatorWidthPx = 0; this.itemSelector = 'TD.romo-datepicker-day:not(.disabled)'; this.calTable = $(); this.date = undefined; - this.today = new Date; + this.today = this._getTodaysDate(); this.prevValue = undefined; this.doInit(); this.doBindElem(); this.doSetFormat(); @@ -591,9 +591,18 @@ return []; } RomoDatepicker.prototype._currentYear = function() { return (new Date).getUTCFullYear(); +} + +RomoDatepicker.prototype._getTodaysDate = function() { + var today = new Date(); + var dd = today.getDate(); + var mm = today.getMonth(); + var yyyy = today.getFullYear(); + + return this._UTCDate(yyyy, mm, dd); } RomoDatepicker.prototype._UTCDate = function(year, month, day) { return new Date(Date.UTC.apply(Date, [year, month, day])); }