If I have:
DatePicker dp = new DataPicker();
and at some point I want to know if the data is greater than today, how can I do it?
Example: if I want to book a room in a hotel from 21/04/2014 well, it should be impossible because today is 28/07/2014.
How can I do it in JavaFX ?
You can write a custom method, which will compare given dates of given date format, and return
true, when current date is "older" than your date of interest, eg:And in context of pure JavaFX you can get the
Stringvalue ofDatePickerchosen date by callingDatePicker.getValue().toString().PS In case You have only one
DatePickerobject, You can use "hidden" method, which will check the current date. It can look like this: