Disable past date in HTML form date selection.
Durning my early days as a software developer I was building an appointment booking form and I needed to add date selection to the form whereby past dates can't be seleted and I found it difficult to implement but I worked around it successfully . Someone facing similar challenge reached out to me recently so I decided to make the solution public. This code solves the problem and can be implemented in code PHP and it frameworks like Laravel.
<input type="date" min="<?php echo date("Y-m-d"); ?>" >
I hope this helps someone out there.