Opened 8 years ago

Closed 6 years ago

#6200 closed bug (invalid)

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');
}

Change History (3)

comment:1 Changed 6 years ago by Scott González

Milestone: TBD1.11.0

comment:2 Changed 6 years ago by mikesherov

Owner: set to Uzza
Status: newpending

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

comment:3 Changed 6 years ago by trac-o-bot

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!

Note: See TracTickets for help on using tickets.