Reputation: 21
I'm making a to-do list in JavaFX. I want people to choose a deadline, so I'm using a Datepicker. However, I can't find out how to check if a person has input a valid Date. Can anybody help me with this?
If it is invalid, I want the system to alert the user with invalid input. Say I don't enter a label and/or datepicker, Java will alert the user with this invalid input by making use of a StringBuilder
With invalid input, I mean "Not a Date" and/or no input at all
Edit: I found it! The datepicker has a .getValue() method I can check if it has a null value.
Upvotes: 0
Views: 830