Skip to content

Commit

Permalink
fix(naming): Fix open variable to _open
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikiki committed Jun 22, 2018
1 parent fe27357 commit 0c182f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default class bulmaCalendar extends EventEmitter {
this._id = 'datePicker' + (new Date()).getTime() + Math.floor(Math.random() * Math.floor(9999));
this.lang = this.options.lang;
this.dateFormat = this.options.dateFormat = this.options.dateFormat || this.element.dataset.dataFormat || moment.localeData().longDateFormat('L');
this.open = false;
this._open = false;

this._build();
this._bindEvents();
Expand Down Expand Up @@ -269,7 +269,7 @@ export default class bulmaCalendar extends EventEmitter {
[onToggleDatePicker](e) {
e.preventDefault();

if (this.open) {
if (this._open) {
this.hide();
} else {
this.show();
Expand Down Expand Up @@ -541,7 +541,7 @@ export default class bulmaCalendar extends EventEmitter {
if (!this.options.overlay) {
this._adjustPosition();
}
this.open = true;
this._open = true;
}

/**
Expand All @@ -550,7 +550,7 @@ export default class bulmaCalendar extends EventEmitter {
* @return {void}
*/
hide() {
this.open = false;
this._open = false;
this.emit('datepicker:hide', this);
this.elementContainer.classList.remove('is-active');
}
Expand Down

0 comments on commit 0c182f6

Please sign in to comment.