How to make fullcalendar to get current month events only? -
i using fullcalendar plugin , display holidays of month via ajax. problem having, method retrieves holidays accepts year , month parameter, not date range.
when using month view of fullcalendar, start , end parameter ranges feb 23rd , apr 6th. need range mar 1st mar 31st. way, can year , month part call method.
this tried without success:
$('#calendar').fullcalendar({ monthnames: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'], monthnamesshort: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'], daynames: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'], daynamesshort: ['dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb'], events: '/get_month_holidays', start: { month: new date((new date()).getfullyear(), (new date()).getmonth(), 1) }, end: { month: (new date((new date()).getfullyear(), (new date()).getmonth() + 1, 1)) - 1 }, buttontext: { today: 'hoy' } })
any appreciated,
thanks jaime
finally used:
eventsources: [ { url: '/get_month_holidays', type: 'post', data: function() { var fecha = $('#calendar').fullcalendar('getdate'); return { month: fecha.getmonth() + 1, year: fecha.getfullyear() } } } ],
and worked. anyway. jaime
Comments
Post a Comment