diff --git a/lib/calendar.js b/lib/calendar.js index f571090..6551f4f 100644 --- a/lib/calendar.js +++ b/lib/calendar.js @@ -164,7 +164,7 @@ Calendar.prototype.nextMonth = function(){ Calendar.prototype.prev = function(){ this.show(this.prevMonth()); - this.emit('view change', this.days.titleDate(), 'prev'); + this.emit('view change', this.days.selectedMonth(), 'prev'); return this; }; @@ -177,7 +177,7 @@ Calendar.prototype.prev = function(){ Calendar.prototype.next = function(){ this.show(this.nextMonth()); - this.emit('view change', this.days.titleDate(), 'next'); + this.emit('view change', this.days.selectedMonth(), 'next'); return this; }; @@ -189,7 +189,7 @@ Calendar.prototype.next = function(){ */ Calendar.prototype.menuChange = function(action){ - var date = this.days.titleDate(); + var date = this.days.selectedMonth(); this.show(date); this.emit('view change', date, action); return this; diff --git a/lib/days.js b/lib/days.js index ffaa3c6..6e5a577 100644 --- a/lib/days.js +++ b/lib/days.js @@ -204,12 +204,12 @@ Days.prototype.titleMonth = function(){ }; /** - * Return a date based on the current view title. + * Return a date based on the field-selected month. * * @api public */ -Days.prototype.titleDate = function(){ +Days.prototype.selectedMonth = function(){ return new Date(this.titleYear(), this.titleMonth(), 1); };