Skip to content

Commit

Permalink
bugfix: ensure expandedDate is the right month
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Dec 14, 2018
1 parent 8b356e3 commit 802d861
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { firstDayOfWeek } from '../lib/date-utilities';

export default Ember.Component.extend({
classNames: 'events-calendar-body',
expandedDate: 0,
expandedDate: 0.0,

@on('init')
setup() {
Expand Down Expand Up @@ -32,7 +32,8 @@ export default Ember.Component.extend({
},

setExpandedDate(date) {
this.set('expandedDate', date);
const month = this.get('currentMonth');
this.set('expandedDate', month + '.' + date);
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export default Ember.Component.extend({
hidden: 0,
hasHidden: Ember.computed.gt('hidden', 0),

@computed('date', 'expandedDate')
expanded(date, expandedDate) {
return date === expandedDate;
@computed('date', 'month', 'expandedDate')
expanded(date, month, expandedDate) {
return `${month}.${date}` === expandedDate;
},

@computed('month', 'currentMonth')
Expand Down

0 comments on commit 802d861

Please sign in to comment.