In my application I am in need to show missing date range. I tried to get the first and last date but got struck to proceed further. when I tried, I got only the first missing date but the expected output is to display all missing dates from the start date to end date.
https://jsfiddle.net/bgef59x2/3/
https://stackblitz.com/edit/ionic-rknmsc?file=pages%2Fhome%2Fhome.ts
var data={
"dataObj"=[
{"custom_date":"2020-04-13"},
{"custom_date":"2020-04-19"},
{"custom_date":"2020-04-20"},
{"custom_date":"2020-04-21"}
]}
my startDate would be "2020-04-13" and enddate would be "2020-04-21" Expected output:
const result =["2020-04-14","2020-04-15","2020-04-16","2020-04-17","2020-04-18"]
Guide me to achieve the expected result in JavaScript/ Typescript. I have not included momentJs in my application.