Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Datepicker: Set drawMonth/Year when selecting a day #681

Closed
wants to merge 1 commit into from

3 participants

@tsibley

Otherwise when July 2012 is displayed but, for example, 4 August 2012 is selected (on the same calendar), then 4 July is marked active in _generateHTML (not 4 August).

@tsibley tsibley Datepicker: Set drawMonth/Year when selecting a day
Otherwise when July 2012 is displayed but, for example, 4 August 2012 is selected (on the same calendar), then 4 July is marked active in _generateHTML (not 4 August).
db11a44
@scottgonzalez

I'm not seeing this behavior. I opened the default datepicker demo, selected August 4 2012, then navigated to July 2012.

@tsibley
@scottgonzalez

I'm not sure if that means that you just can't reproduce it in our provided demos or if you're doing something that's not supported. Can you provide a reduced test case on jsFiddle or jsbin?

@tsibley
@mikesherov
Collaborator

Thanks for contributing the pull request here! However, without unit tests supporting the change, nor a ticket, nor a demonstration of an actual bug, and no movement on this in 4 months, I'm going to close this request until we can get all the things I mentioned sorted out. Thanks again!

@mikesherov mikesherov closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 15, 2012
  1. @tsibley

    Datepicker: Set drawMonth/Year when selecting a day

    tsibley authored
    Otherwise when July 2012 is displayed but, for example, 4 August 2012 is selected (on the same calendar), then 4 July is marked active in _generateHTML (not 4 August).
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.datepicker.js
View
4 ui/jquery.ui.datepicker.js
@@ -904,8 +904,8 @@ $.extend(Datepicker.prototype, {
}
var inst = this._getInst(target[0]);
inst.selectedDay = inst.currentDay = $('a', td).html();
- inst.selectedMonth = inst.currentMonth = month;
- inst.selectedYear = inst.currentYear = year;
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth = month;
+ inst.drawYear = inst.selectedYear = inst.currentYear = year;
this._selectDate(id, this._formatDate(inst,
inst.currentDay, inst.currentMonth, inst.currentYear));
},
Something went wrong with that request. Please try again.