actually I'm quite new to roo. I need for my project a field with a datetime and a field only with the time.
In case of the datetime field I changed the @DateTimeFormat style parameter to SS. The generated form is ok; actually it shows a calendar with the current month. After selecting a date it fills the form with a concrete date with the time 00:00. One minor problem is, changing the time and then change the date again will cause the loose of the time. Is there a way to prevent that behavior?
@DateTimeFormat(style = "SS")
For the time field I changed the style to “-S”. But the generated form shows the date selector. After selecting a date it fills the field with “00:00”. So the format is correct, but the workflow isn’t userfriendly. Is there a way to solve this issue, without changing the view? It doesn’t matter if I choose java.util.date oder calendar.
@DateTimeFormat(style = "-S")
Down below the roo.log for a short test project.
project --topLevelPackage de.mab.datetime
persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
entity --class ~.domain.Timer --testAutomatically
field date --fieldName datetime --type java.util.Date
logging setup --level INFO
controller all --package ~.web