JDK-8102382 : Add DatePicker control
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-01-02
  • Updated: 2015-06-16
  • Resolved: 2013-05-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Blocks :  
Sub Tasks
JDK-8102789 :  
JDK-8102790 :  
Description
DatePicker control to allow choosing and presenting a date.

The goal for JavaFX 8 is to have a simple DatePicker based on the new Date & Time API (JSR-310) in Java 8. This will both fulfill the need for a DatePicker, as well as help migrate people into properly using the new JSR-310 Date & Time API.

Requestors: the JSR-310 team, as well as the Java FX Controls team.

Size & Risk: The scope is fairly small,  and we consider this low risk since there are no down-stream items that depend on this. 

- Approximately 6 new classes: a Control class and a very small DateCell class, each with associated skins and behaviors.
- The diff is in the order of ~1000 lines.
- There may be a few (less than 10) new strings for l10n; these are mostly for date formatting where JSR-310 doesn't suffice.

Mitigation plan: if for any reason we decide this is not ready, we can easily pull it up until fairly late in the game. 

Timeline:  M8, mostly due to dependencies on the still-changing java.time API.

Comments
Implements A360 Feature http://oracleplan.oracle.com/gotoEntity?entityType=FEATURE&entityId=1024511
15-05-2013

So, which build will finally contain the fix? 89?
05-05-2013

DatePicker will be included with b89. However, since JavaFX b89 is built with JDK b88 and is then included with JDK b89, there is some risk for incompatible changes causing runtime errors. This may happen because the JSR-310 DateTime API continues to evolve somewhat for a few more weeks. A workaround, if this happens, is to copy jfxrt.jar from JDK b89 back into JDK b88 and use that.
05-05-2013

Changeset http://hg.openjdk.java.net/openjfx/8/controls/rt/rev/ca1c6c2adf22
05-05-2013

dombler commons (3rd party) provides a DatePicker which is embeddable on a Pane and can be used in other places, similar to what Charles is requesting in his comment on this jira. http://puces-blog.blogspot.ch/2013/04/drombler-commons-javafx-controls-for.html
25-04-2013

Webrev attached for review.
25-04-2013

There are no plans yet to make DatePicker be an embeddable Pane that can be used in other places, but let's file a feature request to consider that in a future release.
25-04-2013

I'm wondering whether there are any plans to offer access to the DatePicker popup view so it can be used separately from the editable ComboBox. It could be useful in cases where it would be cleaner to put it in a context menu an not have to have a editable field displayed.
24-04-2013

The proposed API has been posted to RT-27481.
09-04-2013

The DatePicker will be able to display the chronologies available in the JSR-310 API, i.e. java.time.chrono.*. This includes Hegira (Hijrah) but not currently Jalali. The DatePicker API will use the ISO based LocalDate type for setting and getting values, so an application will need to use the available methods in java.time.chrono.* to convert back and forth. The displayed chronology will be obtained from the Locale, and can also be set explicitly. For reference, see the threeten project at http://openjdk.java.net/projects/threeten/
27-03-2013

Can not make this support other calenders too? Hegira or jalali ...
26-03-2013

I think the UI for the initial implementation will have to be a small subset of the "MUST" features listed in the current UI spec: http://openjdk.java.net/projects/openjfx/ux/datePicker/index.html At a minimum, it will display a read-only ComboBox with the selected date, and a popup showing one month at a time with arrows to switch month, and allowing just one date to be selected. This would behave similarly to the ColorPicker control (not including the additional dialog for advanced settings).
02-01-2013