Ice
Ice

Reputation: 1981

How to allow set hours and minutes for date format?

How to add possibility of set hours and minutes? Currently, I have something like this: enter image description here

But in this case is impossible to set hours and minutes. What should I do to allow set this data via the web browser?

Upvotes: 0

Views: 235

Answers (1)

Hugues M.
Hugues M.

Reputation: 20477

In your entity, I suspect the startDate field is a LocalDate. Try ZonedDateTime instead.

LocalDate: A java.time.LocalDate object, used to correctly manage dates in Java.
ZonedDateTime: A java.time.ZonedDateTime object, used to correctly manage dates and times in Java.

See creating an entity.

Upvotes: 1

Related Questions