Hello everyone, i need to configure a datepicker on my existing laravel project, which is about booking, and the passed date should not be avaliable
Anyone any suggestion?
Thanks in advance
I am trying to add a datepicker with disable past date, because it is a online booking, but i am not sure how to do it correctly.
I have my date picker default
Data
Of course, its not a Laravel issue. There are lots of options and styles, but a consideration is the front-end framework you are using so that the styling fits with the look and feel of your site.
Yeah, most javascript datepickers let you define min and/or max dates. If you want to display something without javascript, which seems like it'd provide rather terrible user experience in 2016, almost 2017.. just make past dates non-clickable.
In either case, include validation on the backend to ensure the submit date is within an acceptable date range.
I don't think anyone is going to hold your hand and write code for you here.. but honestly, if you're building a booking system you shouldn't need that level of hand-holding.
i am not sure how to include that in my existing project
Add the css & javascript either from cdn or however else you prefer to install 3rd party JS libraries (npm, bower, etc)
and to make the datepicker work
Read the docs that @Snapey already linked to.. how to make it work is literally, right there.. including the one criteria you specified -- defining the acceptable start date.