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

126
Views
Selecting a specific day between two inputs

I have two inputs. I want to limit date ranges to 3 days. Once selected, other dates will become inactive. How can I do?

enter image description here

enter image description here

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

0

This solution allows to select only three days on 3 datepickers. You can easily adapt this solution to two different datepicker elements.

enter image description here

/* Allows the date to be the maximum today. */
datePickerId.max = new Date().toISOString().split("T")[0];

/* Allows the date to be a minimum of 3 days ago. */
var date = new Date();
date.setDate(date.getDate() - 3);
datePickerId.min = date.toISOString().split("T")[0];
<input type="date" id="datePickerId" />

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!