How to get the value from ion-datetime

Hello i have a <ion-datetime> and i want to know how i can get the date from it , Im using vanilla javascript

html code

<ion-datetime display-format="DD/MM/YYYY" id="dat" [(ngModel)]="myDate" (ionChange)="showdate()"></ion-datetime>

ts code

public myDate;


Thanks for replying but I’m working with vanilla javascript, can you tell me how to do it with vanilla js