Disable current date in date picker

How would I disable today’s date in a date picker? I found this article, but it doesn’t tell me about the current date.

https://www.wix.com/code/reference/$w.DatePicker.html

1 Like

Hey
Do it like this.

let badDate =  new Date(now.getFullYear(), now.getMonth(), now.getDate());
$w("#datePickerID").disabledDates = [badDate];

That way the todays date will be disabled. If you like my comment please mark it as TOP COMMENT as it helps me a lot.

Thank you!

@andreas-kviby it marks “now.” as an error. How can I fix this?