commentaires

This commit is contained in:
Hedi 2022-03-14 00:39:22 +01:00
parent c04b5da615
commit b933bb478d
3 changed files with 8 additions and 4 deletions

View file

@ -41,21 +41,21 @@
class="btn btn-sm btn-primary"
style="margin-right: 5px"
(click)="navigatePrevious($event)"
>Previous</a
>Semaine précedente</a
>
<a
href="#"
class="btn btn-sm btn-primary"
style="margin-right: 5px"
(click)="navigateToday($event)"
>Today</a
>Aujourd'hui</a
>
<a
href="#"
class="btn btn-sm btn-primary"
style="margin-right: 5px"
(click)="navigateNext($event)"
>Next</a
>Semaine suivante</a
>
<!-- DEBUT : Pour le debugage -->

View file

@ -55,6 +55,7 @@
.btn {
background-color: rgb(241,120,182);
color : white;
border-radius: 12px;
border-radius: 6px;
border-color: white;
font-weight: bold;
}

View file

@ -234,16 +234,19 @@ export class PageAgendaComponent implements AfterViewInit {
});
}
// bouton pour afficher la semaine precedente
navigatePrevious(event: MouseEvent): void {
event.preventDefault();
this.config.startDate = (this.config.startDate as DayPilot.Date).addDays(-7);
}
// bouton pour afficher la semaine suivante
navigateNext(event: MouseEvent): void {
event.preventDefault();
this.config.startDate = (this.config.startDate as DayPilot.Date).addDays(7);
}
// bouton pour afficher la semaine en cours
navigateToday(event: MouseEvent): void {
event.preventDefault();
this.config.startDate = DayPilot.Date.today();