Need help with JavaScript in a Form

Hi there

I created a form for client so people can book a reservation online. I used the date-picker from FlowBase (Webflow Date Picker - Webflow).

Everything works well. However, it should not be possible to select the same day as the reservation in the date picker. For example: If someone makes a reservation on February 25, the earliest he can select is February 26.

Is there a way to achieve this with custom code?

Thank you for any help!


Here is my site Read-Only: Webflow - Löwen Oberdiessbach – Page “Reservieren”

@levifrey try adding the minDate option to your implementation, you can see this jsFiddle:

Something like this would probably work:

        $('[data-toggle="datepicker"]').datepicker({
            format: 'dd-mm-yyyy',
            minDate: "today+1d"
            onSelect: function () {
                $(this).datepicker('hide');
            }
        });

Thank you for you help!

Where exactly do i have to put the code in? Because currently the js is linked to a github with <script src="https://fengyuanchen.github.io/datepicker/js/datepicker.js"></script> and i cant edit this.

Project Settings → Custom Code → Footer Code

<script type="text/javascript">
var Webflow = Webflow || [];
Webflow.push(function () {
   // code here
});

</script>

@levifrey - just add it to the custom code you’ve already put in, the code I added in the bottom of my response was the exact code you have on your site with the extra option added:

image