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

207
Vistas
How can I disable/enable time and date

How can I disable/enable time and date, for example 07/07/2022 12:00PM is off but on 08/07/2022? I want disable time by date but I can not why?

Below is an example which enables/disables the button according to the specified enableTime and disableTime(I'm disabling/enabling BtnExit) this my script function

$(document).ready(function() {
    if (localStorage.getItem("itmEmployee") == "12:00PM")
        $("#employed_v0").prop("checked", true);
    else
        $("#employed_v1").prop("checked", true);

    if (localStorage.getItem("itmEmployee") == "12:00PM")
        $('#datetimepicker').datetimepicker({
            format: 'DD/MM/YYYY'
        });

    if (localStorage.getItem("itmEmployee") == "12:00PM")
        $("#12").prop("disabled", false);
    else
        $("#12").prop("disabled", true);

    $("#12").val(localStorage.getItem("itmTest"));

    $("[name=employed]").on("change", function() {
        localStorage.setItem("itmEmployee", $(this).val());

        if ($(this).val() == "12:00PM")
            $("#12").prop("disabled", false);
        else
            $("#12").prop("disabled", true);
    });

    $("#12").on("change", function() {
        localStorage.setItem("itmTest", $(this).val());
    });
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<label>Date<span>*</span></label>

<input id="datepicker" name="r_date" type="date" required> here we will close it using checkbox

<input type="checkbox" name="employed" id="employed_v1" value="12:00PMM" /> 12:00 PM disable
<input type="checkbox" name="employed" id="employed_v0" value="12:00PM" /> 12:00 PM enable

<select id="all">
  <option>Select</option>
  <option id="12">12:00 PM</option>
</select>
</div>

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