I have about 20 datetime inputs across my application and am doing the same thing over and over
<ion-datetime displayFormat=“DD MMM YYYY” max=“2050” (ionCancel)=“clear(‘date_field’)” cancelText=“Clear” doneText=“Apply” formControlName=“date_field”>
(ionCancel)=“clear” is a function I have implemented in each component class to clear the date field as there is no out of the box solution to clear a date once it has been set.
Is there a way I can default the cancel and done text globally and also have a default ionCancel method??