I have a datepicker where I show two months and I want to randomly choose 3 dates in each visible month
$(\'.date\').datepicker({ minDate: new Date(),
You can convert the boundary dates to integers (Date.getTime()) and then use Math.random() to generate your random dates within given boundaries. Then go back to Date objects with Date.setTime().
Date.getTime()
Math.random()
Date
Date.setTime()