How to calculate days interval from a today?

How to calculate days interval from a today?

I have these two inputs in the first of which, i have a dropdown with the days and on the other one i have a datepicker formated date.

What i want is if i select a value from dropdown to show the date in the datepicker input, and the same backwards.

That's my snippet so far, but in the input i get a full fomated date something like, 
"Wed Apr 03 2019 00:00:00 GMT+0300 (Eastern European Summer Time)"..


Any help on that?
For any further clarification feel free to ask!

Thanks