Options
All
  • Public
  • Public/Protected
  • All
Menu

The timepicker for working with times, such as formatting and parsing times.

Hierarchy

  • Timepicker

Index

Properties

regional: Record<string, JQueryUITimepickerAddon.Locale>

A map with a locale name (fr, de, etc.) as the key and the locale as the value.

version: string

Current version of the DateTimePicker JQueryUI add-on.

Methods

  • Calls datepicker on the startTime and endTime elements, and configures them to enforce the date range limits.

    Parameters

    • startTime: JQuery<HTMLElement>

      DOM element of the date/time picker with the start date/time.

    • endTime: JQuery<HTMLElement>

      DOM element of the date/time picker with the end date/time

    • options: Partial<RangeOptions>

      Options for the $.fn.datepicker call.

    Returns void

  • Calls datetimepicker on the startTime and endTime elements, and configures them to enforce the date / time range limits.

    Parameters

    • startTime: JQuery<HTMLElement>

      DOM element of the date/time picker with the start date/time.

    • endTime: JQuery<HTMLElement>

      DOM element of the date/time picker with the end date/time

    • options: Partial<RangeOptions>

      Options for the $.fn.datetimepicker call.

    Returns void

  • Calls the given method on the startTime and endTime elements, and configures them to enforce the date / time range limits.

    Parameters

    • method: PickerMethod

      Whether to call the datepicker, timepicker, or datetimepicker method on the elements.

    • startTime: JQuery<HTMLElement>

      DOM element of the date/time picker with the start date/time.

    • endTime: JQuery<HTMLElement>

      DOM element of the date/time picker with the end date/time

    • options: Partial<RangeOptions>

      Options for the $.fn.datepicker call.

    Returns JQuery<HTMLElement>

    A JQuery instance containing the given startTime and endTime elements.

  • log(...args: readonly unknown[]): void
  • Log error or data to the console during error or debugging.

    Parameters

    • Rest ...args: readonly unknown[]

      Data to log.

    Returns void

  • Override the default settings for all instances of the time picker.

    Parameters

    Returns Timepicker

    this for chaining.

  • Calls timepicker on the startTime and endTime elements, and configures them to enforce the time range limits.

    Parameters

    • startTime: JQuery<HTMLElement>

      DOM element of the date/time picker with the start date/time.

    • endTime: JQuery<HTMLElement>

      DOM element of the date/time picker with the end date/time

    • options: Partial<RangeOptions>

      Options for the $.fn.timepicker call.

    Returns void

  • timezoneAdjust(date: Date, fromTimezone: string, toTimezone: string): Date
  • JavaScript Dates have not support for timezones, so we must adjust the minutes to compensate.

    Parameters

    • date: Date

      Date to adjust.

    • fromTimezone: string

      Timezone of the given date.

    • toTimezone: string

      Timezone to adjust the date to, relative to the fromTimezone.

    Returns Date

    The given date, adjusted from the fromTimezone to the toTimezone.

  • timezoneOffsetNumber(tzString: string): string | number
  • Get the number in minutes that represents a timezone string.

    Parameters

    • tzString: string

      A formatted time zone string, such as +0500, -1245, or Z.

    Returns string | number

    The offset in minutes, or the given tzString when it does not represent a valid timezone.

  • timezoneOffsetString(tzMinutes: string | number, iso8601: boolean): string
  • Get the timezone offset as string from a timezone offset.

    Parameters

    • tzMinutes: string | number

      If not a number, less than -720 (UTC-12), or greater than 840 (UTC+14), this value is returned as-is

    • iso8601: boolean

      If true formats in accordance to iso8601 (sucha as +12:45).

    Returns string

    The timezone offset as a string, such as +0530 for UTC+5.5.

Generated using TypeDoc