Skip to content

Commit

Permalink
rename .titleDate() to .selectedMonth()
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Oct 17, 2012
1 parent 058a562 commit 8ca00ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand All @@ -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;
};

Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lib/days.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit 8ca00ad

Please sign in to comment.