I have an Angular2 application with PrimeNG suite installed.
I need to implement a form with two input elements and use in order to manage two date values.
I tried to use InputMask applying a specific mask and it works, now I don't know how to covert the date from Italian format ( provided by the user ) to TypeScript/Javascript format in order to be able to post the data...
The code I have implemented is this:
<p-inputMask mask="99/99/9999" [(ngModel)]="offert.dateDelivery" formcontrolname="dateDelivery" placeholder="dd/mm/yyyy" [ngModelOptions]="{standalone: true}" slotChar="dd/mm/yyyy"></p-inputMask>
The property offert.dateDelivery binds a Date field of a class.
The problem is that the user is forced to insert the value in Italian format ( dd/mm/yyyy ) that is actually not acceptable as date from Javascript/Typescript function...
How can I manage this scenario ?
thanks