Answers for "date picker ionic"

2

ion datetime time current set

public date:any = new Date().toISOString();
...
<ion-datetime [(ngModel)]="date"
    displayFormat="MMM DD, YYYY HH:mm"
    formControlName="myDate">
</ion-datetime>
Posted by: Guest on November-29-2020
1

ionic datepicker done

<ion-datetime displayFormat="h:mm a" doneText="Okay"></ion-datetime>
Posted by: Guest on December-03-2020
0

Datepicker ionic

import { DatePicker } from '@ionic-native/date-picker/ngx';

constructor(private datePicker: DatePicker) { }


...


this.datePicker.show({
  date: new Date(),
  mode: 'date',
  androidTheme: this.datePicker.ANDROID_THEMES.THEME_HOLO_DARK
}).then(
  date => console.log('Got date: ', date),
  err => console.log('Error occurred while getting date: ', err)
);
Posted by: Guest on November-04-2020

Browse Popular Code Answers by Language