Class DatePropertyEditor

  • All Implemented Interfaces:
    PropertyEditor

    public class DatePropertyEditor
    extends PropertyEditorSupport
    A property editor for Date objects. This works in tandem with the wmedit:datePicker JSP tag and is needed to support locale sensitive formatting and timezones.
    • Constructor Detail

      • DatePropertyEditor

        public DatePropertyEditor()
    • Method Detail

      • setDateFormat

        public void setDateFormat​(DateFormat dateFormat)
        Sets the syntax of the date/time passed as String to this property editor. If no date format explicitly set, the default dd/MM/yyyy is used.
        Parameters:
        dateFormat - The date format to use to parse the String values and convert them to a Date
        Since:
        10.33.0
      • isSetNullOnEmptyDate

        public boolean isSetNullOnEmptyDate()
        Returns if the value should be set to null in case an empty date string is passed. Default is false.
        Returns:
        true if the value should be set to null in case an empty date string is passed, false otherwise
        Since:
        10.33.0
      • setSetNullOnEmptyDate

        public void setSetNullOnEmptyDate​(boolean setNullOnEmptyDate)
        Sets if the value should be set to null in case an empty date string is passed.
        Parameters:
        setNullOnEmptyDate - if true, the value should be set to null in case an empty date string is passed. If false, empty dates are ignored.
        Since:
        10.33.0