diff --git a/js/jquery.calendario.js b/js/jquery.calendario.js index e10de19..6d3056b 100644 --- a/js/jquery.calendario.js +++ b/js/jquery.calendario.js @@ -290,7 +290,7 @@ inner += this.options.weekabbrs[j + this.options.startIn > 6 ? j + this.options.startIn - 6 - 1 : j + this.options.startIn] + ''; } if (day <= monthLength && (i > 0 || j >= p)){ - inner = '' + day + '' + this.options.weekabbrs[j + + inner = '' + day + '' + this.options.weekabbrs[j + this.options.startIn > 6 ? j + this.options.startIn - 6 - 1 : j + this.options.startIn ] + ''; var strdate = (this.month + 1 < 10 ? '0' + (this.month + 1) : this.month + 1) + '-' + (day < 10 ? '0' + day : day) + '-' + this.year, @@ -354,8 +354,18 @@ } this._generateTemplate(false, callback); }, - - /************************* + + /* + * Pad a number with 0's. Useful for date serials + * @param number The number to be padded with 0's + * @param size Required length for returned number + */ + _pad : function (number, size) { + var s = "000000000" + number; + return s.substr(s.length-size); + }, + + /************************* ***** PUBLIC METHODS ***** **************************/ option : function(option, value) {