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

167
Views
How do i disable certain picking days in an html form if the certain time of the day has pass and based on the $variable driven out of a php?

So I'm making a reservations form, and I'll store all the data including the date in the database, but I don't want the certain dates to show if certain time has pass today, (example 12:00 CET), or if the date is unavaliable, either due to date from database-tbl_unavaliable or due to reaching max amnout of reservations for the day (10 for example). So far after a few hours of searching I've found only this on SO, I don't know if the thing i want is doable or not with php since it's kind of the only thing I currently somewhat know and I'm still currently learning it. I do not know anything of JavaScript. But is there a kind of way to maybe get a $variable with php and make that a condition in JavaScript or something similar?

<script>
function getISODate(){
  var d = new Date();
  return d.getFullYear() + '-' + 
          ('0' + (d.getMonth()+1)).slice(-2) + '-' +
          ('0' + d.getDate()).slice(-2);
}

window.onload = function() {
  document.getElementById('minToday').setAttribute('min',getISODate());
}
</script>

<p>Select date(must be on or after today)<input type="date" id="minToday"></p>

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!