问题描述:

From my html page I want to set a input type="time" value to my java object. But I am unsure what data type I should be expecting on my java object or, is there even a type for this?

This is my html input field:

<input style="color:black;" type="time" th:field="*{timeOut}"></input>

And the timeOut field plus getters and setters:

public static String timeOut;

public String getTimeOut() {

return timeOut;

}

public void setTimeOut(String timeOut) {

RentForm.timeOut = timeOut;

}

Having timeOut as a string works but i want to know if there is a better datatype i can cast to?

Thanks.

相关阅读:
Top