Skip to main content

DateRangePicker - Setting a Date Range

In the following example, the start and end interval of the DateRangePicker object is set to start 5 days from today and end 5 days after that date.

const today = new Date();
const startDate = new Date(today.setDate(today.getDate() + 5));
this. DateRangePicker1.startDate.value = startDate.toDateString();
const endDate = new Date(startDate.setDate(startDate.getDate() + 5));
this. DateRangePicker1.endDate.value = endDate.toString();