Bonsoir,
Lorsque je sélectionne une date dans mon input, il est en format anglais exemple 2010-01-01, comment l'adapter en format français s'il vous plait ?
Pour info, la recherche se passe correctement, je récupère bien les donnés que je suis sensé récupérer avec la date.
HTML
TS
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 <div class="form-group row"> <label for="dp" class="col-12 col-sm-4 col-form-label">Date</label> <div class="col-12 col-sm-8"> <div class="input-group" style="max-width: 300px;"> <input id="picker1" class="form-control" placeholder="yyyy-mm-dd" name="dp" aria-describedby="basic-addon1" style="background-color: white;" ngbDatepicker #dp="ngbDatepicker" [(ngModel)]="search.startdate"> <div class="input-group-append" (click)="dp.toggle()"> <span class="input-group-text" id="basic-addon1"> <i class="icon-regular i-Calendar-4"></i> </span> </div> </div> </div> </div> <div class="d-none d-lg-block"> <button type="button" class="btn btn-primary" (click)="launchSearch(modalConfirm)"> Confirm </button> </div>
D'avance merci
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 search; constructor( ... ) { ... }; this.search = { ... startdate: "", enddate: "" }; launchSearch(content) { if (this.search.name.length > 0 || this.search.isin.length > 0 || this.search.ticker.length > 0) { this.launchSearchResult(content); } else { this.getSlipsArchive(this.search); } }
Partager