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

public interface IDateTimeFormatInputElement<I extends IDateTimeFormatInputElement> extends IFormatInputElement<I,Date>
Immutable DateTimeFormatInputElement component.

A skeletal implementation for date/time type input box.

Author:
katherine
  • Method Details

    • getLocale

      @Nullable Locale getLocale()
      Returns the locale associated with this number input component

      Default: null, if Locales.getCurrent() is preferred

    • withLocale

      I withLocale(@Nullable Locale locale)
      Returns a copy of this immutable component with the specified locale.

      Sets the locale used to identify the symbols of this number input component.

      Parameters:
      locale - The preferred locale

      Default: null, if Locales.getCurrent() is preferred.

      Returns:
      A modified copy of the this object
    • withLocale

      default I withLocale(String locale)
      Returns a copy of this immutable component with the specified locale.

      Sets the locale used to identify the symbols of this number input component.

      Parameters:
      locale - The preferred locale

      Default: null, if Locales.getCurrent() is preferred.

      Returns:
      A modified copy of the this object
    • withValue

      I withValue(@Nullable Date value)
      Description copied from interface: IInputElement
      Returns a copy of this immutable component with the specified value.

      Sets the value of the input component.

      Specified by:
      withValue in interface IInputElement<I extends IDateTimeFormatInputElement,Date>
      Parameters:
      value - The value of the input component.

      Default: null.

      Returns:
      A modified copy of the this object
    • getTimeZone

      default TimeZone 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

      I withTimeZone(TimeZone timeZone)
      Returns a copy of this immutable component with the specified timeZone.

      Sets the time zone that this component belongs to, or null if the default time zone is used.

      Parameters:
      timeZone - The preferred timezone

      Default: TimeZones.getCurrent().

      Returns:
      A modified copy of the this object
    • withTimeZone

      default I withTimeZone(String timeZone)
      Returns a copy of this immutable component with the specified timeZone.

      Sets the time zone that this component belongs to, or null if the default time zone is used.

      Parameters:
      timeZone - The preferred timezone

      Default: TimeZones.getCurrent().

      Returns:
      A modified copy of the this object
    • getValueInZonedDateTime

      @Nullable default ZonedDateTime getValueInZonedDateTime()
      Returns the value (in ZonedDateTime).
    • withValueInZonedDateTime

      I withValueInZonedDateTime(@Nullable ZonedDateTime timeZone)
      Returns a copy of this immutable component with the specified timeZone.

      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. Dates has a set of utilities to simplify the task.
      Returns:
      A modified copy of the this object
    • getValueInLocalDateTime

      @Nullable default LocalDateTime getValueInLocalDateTime()
      Returns the value (in LocalDateTime), might be null unless a constraint stops it.
    • withValueInLocalDateTime

      I withValueInLocalDateTime(@Nullable LocalDateTime dateTime)
      Returns a copy of this immutable component with the specified dateTime.

      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. Dates has a set of utilities to simplify the task.
      Returns:
      A modified copy of the this object
    • getValueInLocalDate

      @Nullable default LocalDate getValueInLocalDate()
      Returns the value (in LocalDate), might be null unless a constraint stops it.
    • withValueInLocalDate

      I withValueInLocalDate(@Nullable LocalDate date)
      Returns a copy of this immutable component with the specified date.

      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. Dates has a set of utilities to simplify the task.
      Returns:
      A modified copy of the this object
    • getValueInLocalTime

      @Nullable default LocalTime getValueInLocalTime()
      Returns the value (in LocalTime), might be null unless a constraint stops it.
    • withValueInLocalTime

      I withValueInLocalTime(@Nullable LocalTime time)
      Returns a copy of this immutable component with the specified time.

      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. Dates has a set of utilities to simplify the task.
      Returns:
      A modified copy of the this object