Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8097293

[DatePicker] Does not change to new selected value if modal window is shown in DatePicker-action

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u20
    • Fix Version/s: 8u40
    • Component/s: javafx
    • Environment:

      Windows 7 64bit, JDK 8u20 Build b23

      Description

      A modal window is shown when changing the value of the DatePicker. Because of that the value of the DatePicker could not be changed.


      import java.time.LocalDate;
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.DatePicker;
      import javafx.scene.layout.VBox;
      import javafx.stage.FileChooser;
      import javafx.stage.Stage;

      public class Test extends Application {

      @Override
      public void start(Stage stage) throws Exception {
      DatePicker datePicker = new DatePicker(LocalDate.now());
      stage.setScene(new Scene(new VBox(datePicker), 300, 200));
      stage.show();

      datePicker.setOnAction(e -> {
      if (stage.isShowing()) {
      new FileChooser().showOpenDialog(stage);
      }
      });
      }

      public static void main(String[] args) {
      launch(args);
      }

      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                msladecek Martin Sládeček
                Reporter:
                aliebelt Andreas Liebelt
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: