I have a bean that contains a field of type java.lang.String . This field contains free-form text that can represent a number, string, or date. When the field represents the date, I visualize the calendar (performances) on the screen, otherwise the input window will be displayed.
The problem that I am facing is that after the user selects a date through the calendar, I need a date string that will be written in a free form field in order to have a specific format (MM / dd / yyyy). Currently, the string that gets installed has the default format that you get when you execute toString() in the java.util.Date object.
Does anyone know how I can control the format of the string that is being written to my field?
Thanks.
source share