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

184
Views
deshabilite el sábado usando jquery-ui-datepicker con el formulario de contacto 7

Hola, estoy tratando de deshabilitar todos los sábados de mi calendario.
el calendario es el formulario de contacto 7 y está usando jquery-ui-datepicker
este es mi código corto:

 [date* your-date date-479 id:datepiicker min:today placeholder "date de reservation*" ]

y este es mi código Jquery:

 jQuery(document).ready(function($) { $("#datepiicker").datepicker({ beforeShowDay: function(date) { var day = date.getDay(); return [(day != 6), '']; } }); });

pero no funciona

 $("#datepiicker").datepicker({ beforeShowDay: function(date) { var day = date.getDay(); return [(day != 6), '']; } });
 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script> <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" /> <input type="date" id="datepiicker" />

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

la solución en mi caso es consultar el día. Si es sábado, puedo restablecer el valor y decirle al usuario que elija otra cosa usando la alerta.

 jQuery(document).ready(function($) { const picker = document.getElementById('datepiicker'); picker.addEventListener('input', function(e){ var day = new Date(this.value).getUTCDay(); if([6].includes(day)){ e.preventDefault(); this.value = ''; alert("This day is not available "); } }); });
about 4 years ago · Juan Pablo Isaza Report
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!