In this tutorial, We will learn how to get selected week using jquery in the fullcalendar. We will talk about get selected week in the full calendar. This tutorial will give you a full calendar to get selected week using jquery example.


<!DOCTYPE html>
        <title>Fullcalendar Get Selected Week Using Jquery Example</title>
        <link href="" rel="stylesheet"/>
        <link href="" rel="stylesheet" media="print"/>
        <link href="" rel="stylesheet" >
        <script src=""></script>
        <script src=""></script>
        <script src=""></script>
        <div class="container">
            <div class="row">
                <div class="col-md-12 mt-5 mb-5">
                    <div id="calendar"></div>

            $(document).ready(function () {
                var date = new Date();
                var d = date.getDate();
                var m = date.getMonth();
                var y = date.getFullYear();
                // page is now ready, initialize the calendar...

                var calendar = $("#calendar").fullCalendar({
                    // put your options and callbacks here
                    header: {
                        right: "today prev,next",
                    height: 550,
                    events: "/json-events.php",
                    selectHelper: true,
                    dayClick: function (start, allDay, jsEvent, view) {
                        if (start < date && start.getDate() != date.getDate())
                            alert("Cannot select past dates.");
                        var title = confirm("Selecte Week");
                        var now = date ? new Date(start - 1) : new Date();
                        now.setHours(0, 0, 0, 0);
                        var sunday = new Date(now);
                        sunday.setDate(sunday.getDate() - sunday.getDay() + 1);
                        var saturday = new Date(now);
                        saturday.setDate(saturday.getDate() - saturday.getDay() + 7);
                        if (title) {
                                        title: "Selected This Week.",
                                        start: sunday,
                                        end: saturday,
                                        allDay: allDay
                                    true // make the event "stick"

Thanks, May this example will help you...