Skip to content

Commit

Permalink
Merge pull request #910 from PriyaGhosal/revert-859-calender
Browse files Browse the repository at this point in the history
Revert "Fix Calendar Date Validation to Restrict Past Dates"
  • Loading branch information
PriyaGhosal authored Oct 17, 2024
2 parents f6654d7 + 248e091 commit 598a132
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 598a132

Please sign in to comment.