Composant date picker ne s'exécute pas
Bonjour,
J'ai deux champs avec des dates à entrer, je récupère parfaitement les datas après avoir renseigner les dates.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| /* start date */
<div class="col-12 col-md-5">
<div class="form-group">
<h5>{{'3170' | t }}</h5>
<input id="start" name="start" type="text" class="form-control"
[(ngModel)]="dates.start"
style="background-color: white; max-width: 300px;width: 100%;"
placeholder="Ex: 2020-01-01" autofocus>
</div>
</div>
/* end date */
<div class="col-12 col-md-5">
<div class="form-group">
<h5>{{'3171' | t }}</h5>
<input id="end" name="end" type="text" class="form-control" [(ngModel)]="dates.end"
style="background-color: white; max-width: 300px;width: 100%;"
placeholder="Ex: 2020-12-31" autofocus>
</div>
</div> |
Mon problème est que j'aimerai utiliser deux dates pickers. Lorsque j'adapte mon code, plus rien ne fonctionne. Rien n'exécute lorsque je clique sur "rechercher".
Je ne comprends pas où est réellement le problème dans mon HTML?
/* date début */
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| <div class="col-12 col-md-5">
<div class="form-group">
<h5>{{'3170' | t }}</h5>
<input id="start" name="start" type="text" class="form-control" placeholder="{{ dates.start }}"
ngbDatepicker #start="ngbDatepicker" [(ngModel)]="dates.start"
style="background-color: white; max-width: 300px;width: 100%;"
autofocus>
<div class="input-group-append" (click)="start.toggle()">
<div class="input-group-text positionCalenderIcon">
<i class="icon-regular i-Calendar-4"></i>
</div>
</div>
</div>
</div> |
/* date de fin */
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| <div class="col-12 col-md-5">
<div class="form-group">
<h5>{{'3171' | t }}</h5>
<input id="end" name="end" type="text" class="form-control" placeholder="{{ dates.end }}"
ngbDatepicker #end="ngbDatepicker" [(ngModel)]="dates.end"
style="background-color: white; max-width: 300px;width: 100%;"
autofocus>
<div class="input-group-append" (click)="end.toggle()">
<div class="input-group-text positionCalenderIcon">
<i class="icon-regular i-Calendar-4"></i>
</div>
</div>
</div>
</div> |
Merci pour votre aide.