// Range date picker
final DatePicker<String> rangeDatePicker = new DatePicker<String>("rangeDatePicker", rangeDateModel);
// > Min date
Calendar thirtyDaysAgo = Calendar.getInstance();
thirtyDaysAgo.add(Calendar.DAY_OF_MONTH, -30);
rangeDatePicker.setMinDate(new DateOption(thirtyDaysAgo.getTime()));
// > Max date
Calendar thirtyDaysFromNow = Calendar.getInstance();
thirtyDaysFromNow.add(Calendar.DAY_OF_MONTH, 30);
rangeDatePicker.setMaxDate(new DateOption(thirtyDaysFromNow.getTime()));
// > Label
rangeDatePicker.setLabel(Model.of("Min/max"));
form.add(rangeDatePicker);