Skip to content

Commit

Permalink
fix(calendar): string selectors for start/endCalendar did not work
Browse files Browse the repository at this point in the history
In case the startCalendar/endCalendar settings were given as string (which basically was supported) the current code assumes the selector would have the same parent as the opposite calendar, which is not even true in the docs-example (where each calendar is inside a form div)
This PR now corrects this, so it is using the given string selector as expected searching in the whole document

Closes #685
  • Loading branch information
lubber-de authored and Sean committed Apr 26, 2019
1 parent 7ff01e3 commit 9604a02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/definitions/modules/calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ $.fn.calendar = function(parameters) {
return null;
}
if (!(selector instanceof $)) {
selector = $module.parent().children(selector).first();
selector = $(selector).first();
}
//assume range related calendars are using the same namespace
return selector.data(moduleNamespace);
Expand Down

0 comments on commit 9604a02

Please sign in to comment.