Hi, I have a date ranger selector. I want to display all date ranges defined for a specific date range, like this:
Suppose my date range is 01/01 / 2017-01 / 07/2017 and I have an array of all dates that are defined between the above date range in db.So the array looks like:
$ sub_dates = ['01 / 01/2017 ',' 02/01/2017 ', ... until 01/07/2017];
So, if I click on a date range in a date picker, I need to show all these specific dates ($ sub_dates) on it.
var sub_dates = ['01/01/2017','02/01/2017',.......till 01/07/2017];
$('.lot-calander1').daterangepicker({
beforeShowDay: function(date){
var string = $.daterangepicker.formatDate('yy-mm-dd', date);
return [ sub_dates.indexOf(string) == -1 ]
}
});
But it does not display this date in the date range selection set. please help what could be the problem
thanks in advance
source
share