Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions MonthPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,22 +359,22 @@ http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt.
return false;
}

var _elem = this.element, _opts = this.options;
if (!this._visible) {
var _elem = this.element, _opts = this.options;

// Allow the user to prevent opening the menu.
event = event || new $.Event();
if (_opts.OnBeforeMenuOpen.call(_elem[0], event) === false || event.isDefaultPrevented()) {
return false;
}
// Allow the user to prevent opening the menu.
event = event || new $.Event();
if (_opts.OnBeforeMenuOpen.call(_elem[0], event) === false || event.isDefaultPrevented()) {
return false;
}

this._ajustYear(_opts);

// If there is an open menu close it first.
if (_openedInstance) {
_openedInstance.Close(event);
}

this._ajustYear(_opts);
// If there is an open menu close it first.
if (_openedInstance) {
_openedInstance.Close(event);
}

if (!this._visible) {
var _menu = this._monthPickerMenu;
this._showMonths();

Expand Down
Loading