I got lot of selected data from fullcalendar. I need to get those selected date from one whole year. How to check that in for loop?
 I tried few answers to add days one by one to my condition from some answers ,but its not working for me. 

Here is my code I tried:

```js
  var t=$(#dttbl).datatable();
    var arr = new Array();
    var date = new Date(),
      var Id = 1;
    var d = date.getDate(),
      month = date.getMonth(),
      year = date.getFullYear()
    var day1 = y + '-01-01';
    var day365 = y + '-12-31';
    for (i = day1; i < day365; day1.setdate(day1.getdate() + 1)) {
      if (($(i.cell).css('backgroundColor', 'blue'))) {
        arr.push(([Id,i,'test']));
        Id++;
      }
    }  
for (i = 0; i < arr.length; i++) {
  t.row.add([
   arr[i][0],
   arr[i][1],
  arr[i][2]
   ]).draw();
   }

```

I tried this `getdate()`, `day1.add(1).day();` , `day1=moment(day1).add(1, 'days')` to add one by one day to check my condition for full year? These are not working for me. Is there any other way to do it?