¿Cómo puedo deshabilitar/habilitar la hora y la fecha, por ejemplo, 07/07/2022 a las 12:00 p. m. está desactivada pero el 07/08/2022? Quiero deshabilitar el tiempo por fecha pero no puedo, ¿por qué?
A continuación se muestra un ejemplo que habilita/deshabilita el botón de acuerdo con el enableTime y disabledTime especificados (estoy deshabilitando/habilitando BtnExit) esta es mi función de secuencia de comandos
$(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>