Guest User

Untitled

a guest
Jun 17th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import javafx.scene.control.DatePicker;
  2. import java.time.Instant;
  3. import java.time.LocalDate;
  4. import java.time.ZoneId;
  5. import java.util.Date;
  6.  
  7. @FXML
  8. private DatePicker datePicker;
  9.  
  10. @FXML
  11. private void handleButtonAction(ActionEvent event) {
  12. // your code here
  13. LocalDate localDate = datePicker.getValue();
  14. Instant instant = Instant.from(localDate.atStartOfDay(ZoneId.systemDefault()));
  15. Date date = Date.from(instant);
  16. // your code here
  17. }
Add Comment
Please, Sign In to add comment