Fullcalendar get start and end date by click event
I will share with you stick of how to get start and end date in fullcalendar js plugin. i will get start date and end date interval by using "getView" in full calendar js. We can also get start and end date by event of fullcalendar.
Yesterday i was working on my php laravel project and i require to write custom click event for next and previous button and load data by ajax. at that time i require to get start date and end date in my jquery file. i found way to get start and end date by using fullcalendar event.
We can get start date by getView event with intervalStart.
We can get end date by getView event with intervalEnd.
You can see here very simple way to get date:
Now you can see my event code with proper format:
var month = $('#calendar').fullCalendar('getView').intervalStart.format('MM');
var year = $('#calendar').fullCalendar('getView').intervalEnd.format('YYYY');
I hope it can help you...
- Add Edit Delete Table Row Example using JQuery
- Ajax Pagination with Laravel 5.8 Tutorial
- Codeigniter Fullcalendar Example
- How to integrate jQuery Fullcalendar using Bootstrap, PHP and MySQL ?
- How to remove comma from string in jquery with example ?
- Jquery - draggable sortable table rows example demo with bootstrap
- Display preview selected image in input type file using JQuery