Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Ion-datetime clear / pickerOptions.buttons

$
0
0

@jwieneke wrote:

Hi,

I try using pickerOptions of ion-datetime to create an additional clear button. Anyway only default buttons appear. Looking into datetime.js it seems like pickerOptions are handled as a string and not parsed correctly to an object. Could somebody have a look at the code and point me to what’s wrong there?

<ion-datetime displayFormat="DD.MM.YYYY" pickerFormat="DD MMM YYYY" monthShortNames="{{ 'DATE.MONTH_SHORT_NAMES' | translate }}"
    [(ngModel)]="dateValue" pickerOptions="{ buttons: [
    {
      text: 'Clear',
      handler: (data: any) => {
        console.log('datetime, clear', data);
      }
    }] }" (ionChange)='onChange()'></ion-datetime>

https://plnkr.co/edit/c7J68cI6MzmY2f0h1XHU?p=preview

Additionaly two screenshots from debugging datetime.js.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>