Local Date Combo
Posted by Darryl Burke on April 22, 2015
LocalDateCombo is a Swing date picker for selecting a java.time.LocalDate from a drop-down MonthView. As with MonthView, the no-arg constructor creates a LocalDateCombo set to the current date, with no upper or lower limits. Additionally, this uses a default format corresponding to java.time.format.FormatStyle.MEDIUM
Five more constructors allow you to set various combinations of initial / minimum (earliest) / maximum (latest) value, and the display format. Here’s a LocalDateCombo with the MonthView dropped down:
This code created that LocalDateCombo, and the screenshot was captured on 4 April 2015.
DateTimeFormatter.ofPattern("E d MMM, uuuu"));
Please note that you will need JDK8 to compile and use this class. You will also need MonthView and related classes, published earlier.