Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
How to show only selected dates and disable all other dates in fullcalendar.io ( JavaScript calendar )

I am using the JavaScript calendar https://fullcalendar.io/. and want to show only selected dates and disable all other dates.

I tried using "validRange" which accepts only start and end, but it doesn't accept array of dates.

Please help

following is my code

<link href="<?php echo base_url(); ?>assets/fullcalendar/main.css" rel="stylesheet" type="text/css">
<script src="<?php echo base_url(); ?>assets/fullcalendar/main.js"></script>

<script>
    document.addEventListener('DOMContentLoaded', function() {
        var calendarEl = document.getElementById('calendar');
        var today = new Date().toISOString().slice(0, 10);
        var calendar = new FullCalendar.Calendar(calendarEl, {
            headerToolbar: {
                left: 'prev,next today',
                center: 'title',
                // right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
                right: 'dayGridMonth'
            },
            
            initialDate: '<?php echo date("Y-m-d"); ?>',
            navLinks: false, // can click day/week names to navigate views
            businessHours: true, // display business hours
            editable: true,
            selectable: true,

            validRange:{
                
                
                start:'2022-08-27',
                end:'2022-08-30',

                
            },

            // events: []
            events: <?php echo $event; ?>
            
        });
        calendar.render();
    });
</script> 
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!