get date list from date of range in react ts

The solution for “get date list from date of range in react ts” can be found here. The following code will assist you in solving the problem.

function (startDate, endDate, addFn, interval) {

addFn = addFn || Date.prototype.addDays;
interval = interval || 1;

var retVal = [];
var current = new Date(startDate);

while (current <= endDate) { retVal.push(new Date(current)); current = addFn.call(current, interval); } return retVal; }

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in