Skip to main content

Search and Top Navigation

#6200 closed bug (invalid)

Opened October 19, 2010 10:04AM UTC

Closed November 02, 2012 09:14AM UTC

Selecting another month by using selectOtherMonths does not work.

Reported by: Uzza Owned by: Uzza
Priority: minor Milestone: 1.11.0
Component: ui.datepicker Version: 1.8.5
Keywords: selectOtherMonths showOtherMonths datepicker 1.8.5 Cc:
Blocked by: Blocking:
Description

Trying to select another month by activating selectOtherMonths does not work.

If you select a date of the previous month, it selects that date of the current month. If you select 31 of the last month, the first day of the next month is selected instead.

After looking at the code and testing, I have found a fix by adding the following after line 867 in _selectDay:

if (month != inst.selectedMonth) {
  if (month > inst.selectedMonth && year < inst.selectedYear)
    this._adjustDate('#datepicker', -1, 'M');
  else if (month < inst.selectedMonth && year > inst.selectedYear)
    this._adjustDate('#datepicker', +1, 'M');
  else if (month > inst.selectedMonth)
    this._adjustDate('#datepicker', +1, 'M');
  else if (month < inst.selectedMonth)
    this._adjustDate('#datepicker', -1, 'M');
}
Attachments (0)
Change History (3)

Changed October 11, 2012 09:04PM UTC by scottgonzalez comment:1

milestone: TBD1.11.0

Changed October 18, 2012 05:59PM UTC by mikesherov comment:2

owner: → Uzza
status: newpending

Thanks for contributing! I can not reproduce this issue: http://jsfiddle.net/vzGdp/ Could you help me out and provide one?

Changed November 02, 2012 09:14AM UTC by trac-o-bot comment:3

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!