A tempus-dominus picker from Eonasdan v6
new TempusDominusConfig() .withRestrictions(cfg -> cfg .withMinDate(Date.from(min.atStartOfDay(ZoneId.systemDefault()).toInstant())) .withMaxDate(Date.from(max.plusWeeks(2).atStartOfDay(ZoneId.systemDefault()).toInstant())) );
new TempusDominusConfig() .withDisplay(cfg -> cfg .withViewMode(ViewModeType.YEARS) .withComponent(ComponentType.CLOCK, false) ) .withLocalization(cfg -> cfg .withJavaFormat("dd/MM/yyyy") ) .withRestrictions(cfg -> cfg .withMaxDate(Date.from(max.minusYears(6).atStartOfDay(ZoneId.systemDefault()).toInstant())) );
new TempusDominusConfig() .withDisplay(cfg -> cfg .withButton(ButtonType.TODAY, true) .withButton(ButtonType.CLEAR, true) .withButton(ButtonType.CLOSE, true) .withIcons(icons -> icons .withDateIcon(FontAwesome6IconType.calendar_days_r) .withTimeIcon(FontAwesome6IconType.clock_s) .withUpIcon(FontAwesome6IconType.arrow_up_s) .withDownIcon(FontAwesome6IconType.arrow_down_s) .withPreviousIcon(FontAwesome6IconType.arrow_left_s) .withNextIcon(FontAwesome6IconType.arrow_right_s) .withTodayIcon(FontAwesome6IconType.calendar_check_s) .withClearIcon(FontAwesome6IconType.eraser_s) .withCloseIcon(FontAwesome6IconType.xmark_s) ) .withComponent(ComponentType.SECONDS, true) ) .withLocalization(cfg -> cfg .withJavaFormat("dd/MM/yyyy HH:mm:ss") );
new TempusDominusConfig() .withClass(LocalDateTime.class) .withRestrictions(cfg -> cfg .withMinDate(min.atStartOfDay()) .withMaxDate(max.atStartOfDay()) ) .withLocalization(cfg -> cfg .withJavaFormat("dd/MM/yyyy HH:mm:ss") );
new TempusDominusConfig() .withClass(LocalDate.class) .withDisplay(cfg -> cfg .withViewMode(ViewModeType.YEARS) ) .withRestrictions(cfg -> cfg .withMaxDate(max.minusYears(6)) );
new TempusDominusConfig() .withClass(LocalTime.class);
new TempusDominusConfig() .withClass(LocalDateTime.class) .withRestrictions(cfg -> cfg .withDayOfWeekDisabled(0) .withDayOfWeekDisabled(6) );