I have two date e.g 1/04/2017 - 30/06/2017
I want to find the first and last date of every month between the date range above.
Like this -
1/04/2017 - 30/04/2017 1/05/2017 - 31/05/2017 1/06/2017 - 30/06/2017
This is because I want to use this solution in fullcalendar for recurring events, so that I can add the date ranges in the below code -
batches.push({
id : item.id,
title : item.title.textCapitalize(),
start : item.start_time,
end : item.end_time,
dow : item.weekdays,
ranges :
[
{
start : '2017-04-01', //all of april
end : '2017-04-20',
},
{
start : '2017-05-01', //all of may
end : '2017-05-31',
},
{
start : '2017-06-01', //all of june
end : '2017-06-30',
},
],
backgroundColor : backgroundColor,
borderColor : backgroundColor
});