Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda