mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
Calendar: Sidemenu calendar next/last month buttons now jump by 1 month, keeping the same day
Matches toolbox arrow buttons
This commit is contained in:
parent
38d5cd627f
commit
3825726152
@ -296,7 +296,12 @@ export class SidemenuDate extends Et2Date
|
||||
*/
|
||||
protected _handleHeaderChange()
|
||||
{
|
||||
let temp_date = new Date("" + this._instance.currentYear + "-" + (this._instance.currentMonth + 1) + "-01");
|
||||
const maxDays = new Date(this._instance.currentYear, this._instance.currentMonth + 1, 0).getDate();
|
||||
|
||||
let temp_date = new Date("" + this._instance.currentYear + "-" +
|
||||
(this._instance.currentMonth + 1) + "-" +
|
||||
("" + Math.min(maxDays, new Date(this.value).getUTCDate())).padStart(2, "0")
|
||||
);
|
||||
temp_date.setUTCMinutes(temp_date.getUTCMinutes() + temp_date.getTimezoneOffset());
|
||||
|
||||
// Go directly
|
||||
|
Loading…
Reference in New Issue
Block a user