How to calculator date with ion-datetime


#1

when i use

(ngModelChange)="getday($event)"

I get value date type string but i want calculator this should i parseInt this . But when i parseInt this value i get just year . Thanks for reading my question!


#2

I think it should be converted to Date so you can calculate whatever you want.
i.e
var date = new Date(stringDate);