Skip to content

Commit

Permalink
Removing on off click on calendar init
Browse files Browse the repository at this point in the history
  • Loading branch information
araujoarthur0 committed May 16, 2020
1 parent 844980b commit f77b561
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions js/classes/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,10 @@ class Calendar {
_initCalendar() {
this._generateTemplate();

var calendar = this;
$('#punch-button').off('click').on('click', function() {
calendar.punchDate();
});

$('#next-month').off('click').on('click', function() {
calendar.nextMonth();
});

$('#prev-month').off('click').on('click', function() {
calendar.prevMonth();
});

$('#current-month').off('click').on('click', function() {
calendar.goToCurrentDate();
});
$('#punch-button').click(() => { this.punchDate(); });
$('#next-month').click(() => { this.nextMonth(); });
$('#prev-month').click(() => { this.prevMonth(); });
$('#current-month').click(() => { this.goToCurrentDate(); });

this._draw();
}
Expand Down

0 comments on commit f77b561

Please sign in to comment.