Opening DateTime Interface from .ts Component

Hey guys,

I am trying to open date picker interface upon selecting an option in ion-select. I have made the ion-datetime element to be hidden by setting hidden=“true” property.

I have given a go to adding a tag in ion-datetime like #datePicker, making a reference of the tag in a component using @ViewChild and adding a line of code datePicker.open() in a ts function which gets executed when I select a particular ion-option. But there has been no luck so far.

Has anyone been successful when confronting with similar problem?

Any helpful reply will be highly appreciated!

Thanks.