I'm trying to use the ng2-datepicker for choosing a date and afterwards displaying it on a table. I'm having the issue that the binding to my chosen date doesn't work. I guess that it has to do something with the format option that I made (DD.MM.YYYY). In my html, I have this code:
<ng2-datepicker [(ngModel)]="date" [options]="datepickeroptions"></ng2-datepicker>
datepickeroptions with typescript is like this:
this.datepickeroptions = {
format: "DD.MM.YYYY",
locale: "de",
};
I tried to initialize the date variable as Date and as string, but none of them worked. I get just [object Object] as value from ngModel although the value in the input container looks ok. Thanks in advance for your help.