Vorbly <Code>

CODING MADE EASY WITH VORBLY

WIX DATEPICKER START & END DATE

Starting a booking website? This tutorial will show you how to set start and end dates for your Wix Datepicker. We will provide you with the webpage elements and sample codes required to implement this feature.

THE DEMO

1/2

THE ELEMENTS

The Page

Datepicker Element: #datePicker1

THE CODE

Page Code

$w.onReady(function () {

     

let today = new Date();

 

let startDate = new Date(today);

startDate.setDate(startDate.getDate() + 1); // Start Date +1 day from today //

 

let endDate = new Date(today);

endDate.setMonth(endDate.getMonth() + 1); // End Date +1 month from today //

 

// Set min & max dates //

$w("#datePicker1").minDate = startDate;

$w("#datePicker1").maxDate = endDate;

 

});

});

COMMENTS

I'm a paragraph. Click here to add your own text and edit me. It's easy.

WEB DESIGN & DEVELOPMENT SOLUTIONS

GET PROFESSIONAL HELP