I'm currently working on a Swing app and I've got a few JTextAreas that are going to be parsed, turned into dates and then added to a MySQL database. One is a Date field, the others are DateTime, what I'm trying to do is use InputVerifier to make sure they're entered correctly.
I've created an InputVerifier that tries to turn the text into a date useing DateFormat.parse() and that mostly works, however there are two flaws: Firstly it can't check if I only have a Date, rather than a date and time Secondly it can't check if I have both a date and time, rather than just one of them.
Is there any way around this? Or a better way to validate date fields in Swing I'm not aware off?