Fix jQuery selector from premature selection of span element in inline/embedded calendar's month selection #1859
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the templating system, we are now able to define the left and right arrows. Users may end up using font icons that typically follow the common empty span with icon class name:
<span class="icon-right-arrow"></span>
.While the font icons show as expected, they are being prematurely selected by jQuery since the code assumes only span elements will only exist for the month listing and not the next/prev arrows which by default are characters. You can replicate this by selecting a date in the below jsfiddle, and then clicking on the month name to enter the month listing. You will see that the active class incorrectly applies itself two months before the actual active month. A similar (same?) issue appeared on the original bootstrap-datepicker smalot/bootstrap-datetimepicker#277
https://jsfiddle.net/rgjsq9bL/
All I've done was retarget the troubled selector to only look for span elements within tbody.