How to handle datepicker when click outside?

<ion-datetime (click)="showLog('present datepicker')" cancelText="{{'common.cancel' | translate}}" doneText="{{'common.ok' | translate}}" (ionCancel)="showLog('cancel')" (ionChange)="onDateChange(); showLog('onChange')" displayFormat="DD/MM/YYYY" max="{{maxDate}}" [(ngModel)]="exchangefromDate"></ion-datetime>

when click outside it should call (ionCancel) but i don’t see anything, above code still working but i want handle when datepicker dissmiss (click cancel + click outside).