0

I want to make a user pick a date. After this, I want to convert it to a java.time.LocalDate without getting in trouble.

I would like to get something looking like this:

JDatePicker

I know, this image is made from a JDatePicker. I read several tutorials about this, but it seems to be outdated or no longer supported – eclipse tells me it cannot import JDatePickerImpl (for example). (I tested that class by trying this tutorial (look for the answer by MadProgrammer)).


  1. What do I search for? (I guess it already exists, I wonder if I had to implement it myself.)
  2. How to use it? (Link for a good tutorial, for example)

    • setting date (using java.time.LocalDate)
    • getting date (using java.time.LocalDate)
  3. I need to use "big" dates: I would like to make it work with at least 2000 years from now. For this purpose it's important to make the user able to type the year manually. (Instead of clicking up and down, but in the image it looks like this is possible.)
Asqiir
  • 607
  • 1
  • 8
  • 23

1 Answers1

0

I am not sure if I understand all your specs well but at least I can share tutorial from Oracle docs which worked fine for me with Java8 (JavaFX) when I experimented with the date.

JavaFX Date Picker

Hope it helps.

vviston
  • 183
  • 1
  • 12