transitOptionsPanel: Select day when setting date button
Also select the day when updating the date button (e.g. when
selecting "Leave by" or "Arrive by". Otherwise the calendar would
have the last selected day selected (or the day the instance was
created, that is when Maps was started).
Marcus Lundblad authored 2 years ago
Marcus Lundblad committed 2 years ago
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
133 | /** | |
134 | * Update the date select button with given date, and select the | |
135 | * corresponding day in the calendar shown when clicking the button. | |
136 | */ | |
133 | 137 | _updateTransitDateButton(date) { |
138 | let calendar = this._transitDateButton.popover.get_child(); | |
139 | ||
140 | calendar.select_month(date.get_month(), date.get_year()); | |
141 | calendar.select_day(date.get_day_of_month()); | |
134 | 142 | this._transitDateButton.label = |
135 | 143 | /* |
136 | 144 | * Translators: this is a format string giving the equivalent to |