Opened 9 years ago
Last modified 7 years ago
#9923 open bug
Datepicker: changeMonth combined with showCurrentAtPos
Reported by: | Mamen | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.datepicker | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The options changeMonth and changeYear is visible on the first visible month. However they change the month selected in showCurrentAtPos. This seems very strange. I believe the position of the selects should be in the month selected in showCurrentAtPos.
Change History (4)
comment:1 Changed 9 years ago by
Status: | new → open |
---|
comment:2 Changed 9 years ago by
I think a better change is making the selects behave as expected in their current position. Especially if we're considering #7580,
Are there examples of software or sites that display multiple months to compare this to?
comment:3 Changed 9 years ago by
Just to note, the rewrite removes the select elements, but provides extension APIs for adding your own.
comment:4 Changed 7 years ago by
I found a solution for the showCurrentAtPos bug issue:
--- jquery-ui.orig.js 2015-11-23 20:04:52.000000000 +0100 +++ jquery-ui.js 2015-11-23 17:56:37.987111191 +0100 @@ -8815,6 +8815,8 @@ origyearshtml = inst.yearshtml = null; }, 0); } + // FIX BUG http://bugs.jqueryui.com/ticket/7288 + inst.drawMonth += this._get(inst, "showCurrentAtPos"); }, // #6694 - don't focus the input if it's already focused @@ -8940,9 +8942,14 @@ if (this._isDisabledDatepicker(target[0])) { return; } + // FIX BUG http://bugs.jqueryui.com/ticket/7288 + /* this._adjustInstDate(inst, offset + (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning period); + */ + this._adjustInstDate(inst, offset, period); + this._updateDatepicker(inst); },
I agree that this makes sense. We can take this approach on the rewrite.