1

I'm trying to filter events with checkboxes. I tried this (Based on this question/answer: https://stackoverflow.com/a/29993265/4876591)

eventRender: function(event, element) {

        return ['all', event.state].indexOf(function(){
                    $('input[type="checkbox"]').each(function() {
                    return $(this).val()
               });
        }) >= 0;           
}

On change event:

$('input[type="checkbox"]').on('change', function(){
   $('#mycalendar').fullCalendar('rerenderEvents');
}

html:

<input type="checkbox" name="estado" value="all">All
<input type="checkbox" name="estado" value="0">Open
<input type="checkbox" name="estado" value="1">Close

Any advice with this problem? Thanks in advance

Community
  • 1
  • 1
r4il
  • 11
  • 5

0 Answers0