diff --git a/Readme.md b/Readme.md index beec9d8..be1eac8 100644 --- a/Readme.md +++ b/Readme.md @@ -39,17 +39,14 @@ cal.el.appendTo('body'); Show the given `date`. This does _not_ select the given date, it simply ensures that it is visible in the current view. -### Calendar#monthMenu() +### Calendar#showMonthSelect() - Adds a month dropdown menu to allow jumping to selected month. + Add month selection input. -### Calendar#yearMenu([from], [to]) +### Calendar#showYearSelect([from], [to]) - Adds a year dropdown menu to allow jumping to selected year. `From` specifies the first year shown in the dropdown and `to` the last year. This means that if `to` is less than `from`, the years will be listed in descending order. - - If `from`/`to` are both not specified the dropdown defaults to -/+ 10 years from the calendar's date. - - If only `from` specified it defaults `to` +20 years from that year. + Add year selection input, with optional range specified by `from` and `to`, + which default to the current year -10 / +10. ### Calendar#prev() diff --git a/lib/calendar.js b/lib/calendar.js index d5427d8..cfd2027 100644 --- a/lib/calendar.js +++ b/lib/calendar.js @@ -106,7 +106,7 @@ Calendar.prototype.show = function(date){ * @api public */ -Calendar.prototype.yearMenu = function(from, to){ +Calendar.prototype.showYearSelect = function(from, to){ if (!from) { from = this._date.getFullYear() - 10; to = this._date.getFullYear() + 10; @@ -124,7 +124,7 @@ Calendar.prototype.yearMenu = function(from, to){ * @api public */ -Calendar.prototype.monthMenu = function(){ +Calendar.prototype.showMonthSelect = function(){ this.days.monthMenu(); this.show(this._date); return this; diff --git a/test/index.html b/test/index.html index 9baad43..e28d43f 100644 --- a/test/index.html +++ b/test/index.html @@ -23,7 +23,7 @@