Closed joworeiter closed 3 years ago
Hi @joworeiter
Not sure but maybe somewhere in your project has other click listener which closes the datepicker.
Hi @kekeh, thanks for the fast response. If I move the clickhandler to the input it doesnt work either. I added a cal icon with pos. absolute and add the handler there it is working... Dont know why, but it works. Thanks for help.
See new markup blow:
<div class="input-group" [ngClass]="{ 'form__control--error': hasError() }">
<input angular-mydatepicker
[locale]="locale"
[options]="myOptions"
class="form-control Input_default Input_text"
placeholder="{{ field.placeholder || field.label | translate }}"
[name]="field.name"
[(ngModel)]="model"
[ngModelOptions]="{standalone: true}"
(dateChanged)="updateValues($event)"
#dp="angular-mydatepicker"/>
<div class="input-group-append" (click)="toggleCalendar()">
<span>
<img src="assets/images/form-input-right-datepicker.svg">
</span>
</div>
</div>
Hi, I'm currently implementing the datepicker into a Angular 8.2 Application.
I got a really strange behavior: Basicly the picker works perfectly fine. Nevertheless the month/year overview gets onclick displayed, the picker closes and I can't figure out why.
I tried several different options like
closeSelectorOnDateSelect: false
and removing/adding different options whithout any changed behavior. Also different Browsers (FF, Chrome, Edge)See my code blow:
date.component.ts:
date.component.html:
Maybe I'm doing something wrong and someone can help me.