mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
Agenda add functionality to change year and month
This commit is contained in:
@@ -191,6 +191,9 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
}, 1000)
|
||||
|
||||
|
||||
window['year'] = this.changeYear
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -738,6 +741,31 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
changeYear = (year) => {
|
||||
const a = this.calendar.currentDate
|
||||
this.calendar.currentDate = new Date(`${year}-${a.getMonth()}-${a.getDay()}`);
|
||||
|
||||
try {
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
} catch(e) {}
|
||||
|
||||
this.updateEventListBox()
|
||||
|
||||
}
|
||||
|
||||
changeMonth = (month) => {
|
||||
const a = this.calendar.currentDate
|
||||
this.calendar.currentDate = new Date(`${a.getFullYear()}-${month}-${a.getDay()}`);
|
||||
|
||||
try {
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
} catch(e) {}
|
||||
|
||||
this.updateEventListBox()
|
||||
}
|
||||
|
||||
|
||||
get viewEventMonth () {
|
||||
return this.viewDate.getMonth()
|
||||
|
||||
Reference in New Issue
Block a user