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

201
Views
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
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!