Interface IDateTimeFormatInputElement<I extends IDateTimeFormatInputElement>
- All Superinterfaces:
IChildrenOfInputgroup<I>,IComponent<I>,IFormatInputElement<I,,Date> IHtmlBasedComponent<I>,IInputElement<I,,Date> IReadonly<I>,IXulElement<I>
- All Known Subinterfaces:
IDatebox,ITimebox,ITimepicker
DateTimeFormatInputElement component.
A skeletal implementation for date/time type input box.
- Author:
- katherine
-
Method Summary
Modifier and TypeMethodDescriptionReturns the locale associated with this number input componentdefault TimeZoneReturns the time zone that this component belongs to, or null if the default time zone is used.default LocalDateReturns the value (in LocalDate), might be null unless a constraint stops it.default LocalDateTimeReturns the value (in LocalDateTime), might be null unless a constraint stops it.default LocalTimeReturns the value (in LocalTime), might be null unless a constraint stops it.default ZonedDateTimeReturns the value (in ZonedDateTime).default IwithLocale(String locale) Returns a copy ofthisimmutable component with the specifiedlocale.withLocale(Locale locale) Returns a copy ofthisimmutable component with the specifiedlocale.default IwithTimeZone(String timeZone) Returns a copy ofthisimmutable component with the specifiedtimeZone.withTimeZone(TimeZone timeZone) Returns a copy ofthisimmutable component with the specifiedtimeZone.Returns a copy ofthisimmutable component with the specifiedvalue.Returns a copy ofthisimmutable component with the specifieddate.withValueInLocalDateTime(LocalDateTime dateTime) Returns a copy ofthisimmutable component with the specifieddateTime.Returns a copy ofthisimmutable component with the specifiedtime.withValueInZonedDateTime(ZonedDateTime timeZone) Returns a copy ofthisimmutable component with the specifiedtimeZone.Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetClass, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverridesMethods inherited from interface org.zkoss.stateless.sul.IFormatInputElement
getFormat, withFormatMethods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getSkeleton, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withSkeleton, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndexMethods inherited from interface org.zkoss.stateless.sul.IInputElement
getCols, getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInputAttributes, getInstant, getMaxlength, getName, getPlaceholder, getValue, isDisabled, isInplace, withCols, withConstraint, withDisabled, withErrorboxIconSclass, withErrorboxSclass, withErrorMessage, withInplace, withInputAttributes, withInstant, withMaxlength, withName, withPlaceholderMethods inherited from interface org.zkoss.stateless.sul.IReadonly
isReadonly, withReadonlyMethods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
Method Details
-
getLocale
Returns the locale associated with this number input componentDefault:
null, ifLocales.getCurrent()is preferred -
withLocale
Returns a copy ofthisimmutable component with the specifiedlocale.Sets the locale used to identify the symbols of this number input component.
- Parameters:
locale- The preferred localeDefault:
null, ifLocales.getCurrent()is preferred.- Returns:
- A modified copy of the
thisobject
-
withLocale
Returns a copy ofthisimmutable component with the specifiedlocale.Sets the locale used to identify the symbols of this number input component.
- Parameters:
locale- The preferred localeDefault:
null, ifLocales.getCurrent()is preferred.- Returns:
- A modified copy of the
thisobject
-
withValue
Description copied from interface:IInputElementReturns a copy ofthisimmutable component with the specifiedvalue.Sets the value of the input component.
- Specified by:
withValuein interfaceIInputElement<I extends IDateTimeFormatInputElement,Date> - Parameters:
value- The value of the input component.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getTimeZone
Returns the time zone that this component belongs to, or null if the default time zone is used.The default time zone is determined by
TimeZones.getCurrent(). -
withTimeZone
Returns a copy ofthisimmutable component with the specifiedtimeZone.Sets the time zone that this component belongs to, or null if the default time zone is used.
- Parameters:
timeZone- The preferred timezoneDefault:
TimeZones.getCurrent().- Returns:
- A modified copy of the
thisobject
-
withTimeZone
Returns a copy ofthisimmutable component with the specifiedtimeZone.Sets the time zone that this component belongs to, or null if the default time zone is used.
- Parameters:
timeZone- The preferred timezoneDefault:
TimeZones.getCurrent().- Returns:
- A modified copy of the
thisobject
-
getValueInZonedDateTime
Returns the value (in ZonedDateTime). -
withValueInZonedDateTime
Returns a copy ofthisimmutable component with the specifiedtimeZone.Sets the value (in ZonedDateTime).
- Parameters:
timeZone- The date to be assigned to this component.
Notice that, if this component does not allow users to select the time (i.e., the format limited to year, month and day), the date specified here is better to set hour, minutes, seconds and milliseconds to zero (for the current timezone,TimeZones.getCurrent()), so it is easier to work with other libraries, such as SQL.Dateshas a set of utilities to simplify the task.- Returns:
- A modified copy of the
thisobject
-
getValueInLocalDateTime
Returns the value (in LocalDateTime), might be null unless a constraint stops it. -
withValueInLocalDateTime
Returns a copy ofthisimmutable component with the specifieddateTime.Sets the value (in LocalDateTime).
- Parameters:
dateTime- The date to be assigned to this component.
Notice that, if this component does not allow users to select the time (i.e., the format limited to year, month and day), the date specified here is better to set hour, minutes, seconds and milliseconds to zero (for the current timezone,TimeZones.getCurrent()), so it is easier to work with other libraries, such as SQL.Dateshas a set of utilities to simplify the task.- Returns:
- A modified copy of the
thisobject
-
getValueInLocalDate
Returns the value (in LocalDate), might be null unless a constraint stops it. -
withValueInLocalDate
Returns a copy ofthisimmutable component with the specifieddate.Sets the value (in LocalDate).
- Parameters:
date- The date to be assigned to this component.
Notice that, if this component does not allow users to select the time (i.e., the format limited to year, month and day), the date specified here is better to set hour, minutes, seconds and milliseconds to zero (for the current timezone,TimeZones.getCurrent()), so it is easier to work with other libraries, such as SQL.Dateshas a set of utilities to simplify the task.- Returns:
- A modified copy of the
thisobject
-
getValueInLocalTime
Returns the value (in LocalTime), might be null unless a constraint stops it. -
withValueInLocalTime
Returns a copy ofthisimmutable component with the specifiedtime.Sets the value (in LocalTime).
- Parameters:
time- The date to be assigned to this component.
Notice that, if this component does not allow users to select the time (i.e., the format limited to year, month and day), the date specified here is better to set hour, minutes, seconds and milliseconds to zero (for the current timezone,TimeZones.getCurrent()), so it is easier to work with other libraries, such as SQL.Dateshas a set of utilities to simplify the task.- Returns:
- A modified copy of the
thisobject
-