Date Picker- restrict date selection to be 2 weeks from current day

Is it possible to restrict the date picker selection to be 2 weeks from current day? For example, I am creating a form with a date picker and would like to restrict the user from selecting a date less than two weeks from the current date.

Thank you.

Hello @gwmyers,

You can set a date range that can be selected in the calendar using widgetOptions property of the Date field.

var today = new Date();
var minDate = today.setDate(today.getDate()+7);

fd.field('Date').widgetOptions = {
    min: new Date(minDate)

Please find more information here.

Thank you for your help!

1 Like