Skip to content

Commit

Permalink
fix calender issue
Browse files Browse the repository at this point in the history
  • Loading branch information
akash70629 committed Oct 16, 2024
1 parent 58c4c30 commit 3b59081
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,18 @@ <h2>Book a Cab or Auto</h2>
</select>
</div>

<div class="form-group">
<label for="travel-date" style="font-size: 15px;"><strong>Travel Date</strong></label>
<input type="date" id="travel-date" name="travel-date" required />
</div>
<div class="form-group">
<label for="travel-date" style="font-size: 15px;"><strong>Travel Date</strong></label>
<input type="date" id="travel-date" name="travel-date" required min="" />

<!--Logic To prevent the user from selecting an old date -->

<script>
const today = new Date().toISOString().split('T')[0];
document.getElementById('travel-date').setAttribute('min', today);
</script>

</div>
<div class="form-group">
<label for="travel-time" style="font-size: 15px;"><strong>Travel Time</strong></label>
<input type="time" id="travel-time" name="travel-time" required />
Expand Down

0 comments on commit 3b59081

Please sign in to comment.