Datepicker2 disable date range from selected date from datepicker1

hello , i want to ask how to disable a date in a range.
here is my problem
i have checkin(datepicker1) date and checkout(datepicker2) date,
when checkin date selected 20-Jan-20 , then checkout date will be disabled from today date to 20-Jan-20.
i appreciate your help, thank you

Use the disableDate() function of the Datepicker to disable dates.

thank you yisrael,

well actually im a newbie, i already try the disabledate function but it didnt work properly

Following on from Yisrael’s post about disabling dates, you should be able to do something like this with the required datePicker element.

Set disabledDates to an empty array - [ ] - to remove the current disabled dates.

$w.onReady(function () {
​
$w("#datePicker1").disabledDaysOfWeek = [1, 2, 3];
​
});
//For Reference
// Monday        :   1
// Tuesday       :   2
// Wednesday     :   3
// Thursday      :   4
// Friday        :   5
// Saturday      :   6
// Sunday        :   0

To go with this code above, you can have a look at these too.
https://www.vorbly.com/Vorbly-Code/WIX-DATEPICKER-START-%26-END-DATE
https://www.vorbly.com/Vorbly-Code/WIX-DATEPICKER-START-%26-END-FROM-DATABASE
https://www.vorbly.com/Vorbly-Code/WIX-DATEPICKERS-HOTEL-PRICING-CALCULATIONS
https://www.vorbly.com/Vorbly-Code/WIX-DAYS-BETWEEN-TWO-DATEPICKERS

You can search previous forum posts for more help too.

Plus, you can see this code example from Sam (Wix Mod) which will help you out on Stack here.