Skip to content

Commit

Permalink
Revert "Fix Calendar Date Validation to Restrict Past Dates"
Browse files Browse the repository at this point in the history
  • Loading branch information
PriyaGhosal authored Oct 17, 2024
1 parent f6654d7 commit 248e091
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -691,18 +691,10 @@ <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 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-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-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 248e091

Please sign in to comment.