Customize Datetime's Picker



I am trying to customize the picker that appears when we click on the DateTime component (native component). I saw that we can use an “pickerOptions” but I’ve got an error :confused:

Is there any remedy for this issue?

The source code is below:
ion-datetime classe=“date” mode=“ios” displayFormat="{{displayFormat}}" pickerFormat="{{pickerFormat}}" pickerOptions="{{optionsDatePicker}}" min="{{min}}" max="{{max}}" [(ngModel)]=“reportingDate” (ionChange)=‘onDatePicked()’

And I had this error:
Cannot create property ‘columns’ on string ‘[object Object]’

Thank you four your time.




after some struggles with the same error I was able to get this to work:

[pickerOptions]='{enableBackdropDismiss: false}'


When you’re binding to strings, these two are equivalent:


When you’re binding to anything else, you must use the second syntax, and therefore I recommend simply getting in the habit of preferring it over the first option in all cases.

Getting unsafe url error
SanitizeHtml Pipe not working
Ion-datetime clear / pickerOptions.buttons
How to disable a button on a condition?