Merge pull request #105 from AlineRinquin/calendrier

commentaires
This commit is contained in:
AlineRinquin 2022-03-14 08:31:40 +01:00 committed by GitHub
commit 7c3db84ffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();