Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

user224564's avatar

Laravel Datepicker

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

0 likes
7 replies
willvincent's avatar

Lots of jquery options. Have you searched? What specific criteria do you need to fulfill?

user224564's avatar

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

user224564's avatar

@Snapey yes i am using bootstrap, but i am not sure how to include that in my existing project and to make the datepicker work. Thanks in advance

willvincent's avatar

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.

willvincent's avatar

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.

Please or to participate in this conversation.