Class DefaultDateEditor

    • Field Detail

      • TIME_ZONE_READ_ONLY

        public static final java.lang.String TIME_ZONE_READ_ONLY
        See Also:
        Constant Field Values
      • DISPLAYED_TIME_ZONES

        public static final java.lang.String DISPLAYED_TIME_ZONES
        See Also:
        Constant Field Values
      • DISABLE_INLINE_EDITING

        public static final java.lang.String DISABLE_INLINE_EDITING
        See Also:
        Constant Field Values
      • DISABLE_INLINE_EDITING_SCLASS

        public static final java.lang.String DISABLE_INLINE_EDITING_SCLASS
        See Also:
        Constant Field Values
      • SHOW_CALENDAR_ON_FOCUS

        protected static final java.lang.String SHOW_CALENDAR_ON_FOCUS
        See Also:
        Constant Field Values
      • DEFAULT_TIMEZONES

        protected static final java.lang.String DEFAULT_TIMEZONES
        See Also:
        Constant Field Values
      • TIMEZONES_DELIMITER

        protected static final java.lang.String TIMEZONES_DELIMITER
        See Also:
        Constant Field Values
    • Constructor Detail

      • DefaultDateEditor

        public DefaultDateEditor()
    • Method Detail

      • getDateFormat

        protected java.lang.String getDateFormat​(java.lang.String dateFormatInput)
        Description copied from class: AbstractDateTimeEditor
        Determines the date format for the component.

        The given date format can be either a custom date format e. g. dd/MM/yyyy (see SimpleDateFormat) or the following constants for getting a localized date format:

        • short
        • medium
        • long
        • full
        Overrides:
        getDateFormat in class AbstractDateTimeEditor<org.zkoss.zul.Datebox>
        Parameters:
        dateFormatInput - the configured date format
        Returns:
        date format string (DateFormat) for the component or null if format is invalid
      • getDateFormat

        protected java.lang.String getDateFormat​(int dateStyle)
        Description copied from class: AbstractDateTimeEditor
        Determines a format string for specified format style (see: DateFormat)
        Specified by:
        getDateFormat in class AbstractDateTimeEditor<org.zkoss.zul.Datebox>
        Parameters:
        dateStyle - format style
        Returns:
        format string
      • getDateTimeFormat

        protected java.lang.String getDateTimeFormat​(int dateStyle,
                                                     int timeStyle)
      • shouldInputBeDisabled

        protected boolean shouldInputBeDisabled​(EditorContext<java.util.Date> context)
      • initTimezoneManagement

        @Deprecated(since="6.5",
                    forRemoval=true)
        protected void initTimezoneManagement​(org.zkoss.zul.Datebox box,
                                              EditorContext<java.util.Date> context)
        Deprecated, for removal: This API element is subject to removal in a future version.
        since 6.5, please use the initTimeZone(Datebox, EditorContext) instead.
      • getDisplayedTimeZones

        protected java.lang.String getDisplayedTimeZones​(EditorContext<java.util.Date> context)
      • coerceFromString

        protected java.util.Date coerceFromString​(org.zkoss.zul.impl.InputElement editorView,
                                                  java.lang.String text)
        Description copied from class: AbstractTextBasedEditorRenderer
        Converts string value to a real value.
        Specified by:
        coerceFromString in class AbstractTextBasedEditorRenderer<java.util.Date>
        Parameters:
        editorView - the underlying editor component
        text - the string vale
        Returns:
        the value
      • setTimeZone

        protected void setTimeZone​(org.zkoss.zul.Datebox box,
                                   java.util.TimeZone timeZone)
      • isTimeZoneReadOnly

        protected boolean isTimeZoneReadOnly​(EditorContext<java.util.Date> context)
      • isInitialTimeZoneInDisplayedTimezones

        protected boolean isInitialTimeZoneInDisplayedTimezones​(java.lang.String displayedTimeZonesString,
                                                                java.util.TimeZone initialTimeZone)
      • getTimeZones

        protected java.util.List<java.util.TimeZone> getTimeZones​(java.lang.String timeZonesString)