Continuing the discussion from Have DateTime be opened by button?:
this one is ts
import { Component, OnInit, ViewChild } from ‘@angular/core’;
import { IonDatetime } from ‘@ionic/angular’;
@Component({
selector: ‘app-set-appointment’,
templateUrl: ‘./set-appointment.component.html’,
styleUrls: [‘./set-appointment.component.scss’],
})
export class SetAppointmentComponent implements OnInit {
@ViewChild(‘picker’) picker: IonDatetime;
public datePicker: string;
constructor() {}
ngOnInit() {}
changeDate(event) {
console.log(event.detail.value, ‘cahngedate’);
this.datePicker = event.detail.value;
}
}
i need this type of picker in button value will show and onclick calendar open how can i acheive please help me
ionic 6 using capactior