mercredi 30 janvier 2019

FullCalendar switch events by user in vuejs

I have configured fullcalendar in vuejs, events of 3 members now i want to show hide users events on click.

Normal jQuery working perfect but i am new on vuejs so don't have idea how to do that.

$('#mycalendar').fullCalendar({
    events: [
        {
            title: 'Event 1',
            start: '2015-05-01',
            school: '1'
        },
        {
            title: 'Event 2',
            start: '2015-05-02',
            school: '2'
        },
        {
            title: 'Event 3',
            start: '2015-05-03',
            school: '1'
        },
        {
            title: 'Event 4',
            start: '2015-05-04',
            school: '2'
        }
    ],
    eventRender: function eventRender( event, element, view ) {
        return ['all', event.school].indexOf($('#school_selector').val()) >= 0
    }
});

$('#school_selector').on('change',function(){
    $('#mycalendar').fullCalendar('rerenderEvents');
})



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2Gg4csr
via IFTTT

Aucun commentaire:

Enregistrer un commentaire