Page MenuHomePhabricator

Calendar widget skipping one month ahead
Closed, ResolvedPublicBUG REPORT

Description

In the Calendar widget in Campaign Events, when clicking on a date that is in the following month (example, it is the June monthly calendar, but clicking on July 1 at the end of the month), the calendar will incorrectly select one extra month in advance. For example, clicking on July 1st in the June calendar, will currently select August 1st instead.

see attached video:

august.mov-5F430AE4-A3C1-4BD7-A6C3-F748624677A3.gif (444×720 px, 2 MB)

I am not sure where to put this ticket - @Mooeypoo recommended OOUI.

notes from @matmarex:
in mw.widgets.datetime.CalendarWidget.prototype.onDayClick, calling setFocusedDate "advances" the calendar by a month and the next call to setSelected uses the wrong month because of that

Event Timeline

matmarex edited subscribers, added: matmarex; removed: Batorsz.

Change 813714 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] CalendarWidget: Fix skipping ahead when clicking a date in the next month

https://gerrit.wikimedia.org/r/813714

Change 813714 merged by jenkins-bot:

[mediawiki/core@master] CalendarWidget: Fix skipping ahead when clicking a date in the next month

https://gerrit.wikimedia.org/r/813714