CLOCK_ELEMENT

Type: string

HOURMIN_ELEMENT

dist/datechooser.mjs
HOURMIN_ELEMENT

Type: string

DATETIME_ELEMENT

dist/datechooser.mjs
DATETIME_ELEMENT

Type: string

TIMERANGE_ELEMENT

dist/datechooser.mjs
TIMERANGE_ELEMENT

Type: string

hourMinRegEx
HOUR_MIN_24

Type: string

START_LABEL

Type: string

DEFAULT_START_LABEL

dist/datechooser.mjs
DEFAULT_START_LABEL

Type: string

END_LABEL

Type: string

DEFAULT_END_LABEL

dist/datechooser.mjs
DEFAULT_END_LABEL

Type: string

DUR_LABEL

Type: string

DEFAULT_DUR_LABEL

dist/datechooser.mjs
DEFAULT_DUR_LABEL

Type: string

PREV_NEXT

Type: string

new Clock()

Extends HTMLElement

Instance Members
updateNow()

HourMinChooser

dist/datechooser.mjs

Hour and Minute chooser. Use as ''

new HourMinChooser()

Extends HTMLElement

Instance Members
showHide()
asDuration
time
_internalSetTime(dt)

DateTimeChooser

dist/datechooser.mjs

Date and Time chooser using native date chooser and the above HourMinChooser for the hour and minute of time.

new DateTimeChooser(time: any)

Extends HTMLElement

Parameters
time (any)
Static Members
observedAttributes
Instance Members
updateTime(newTime)
timeModified()
time
attributeChangedCallback(name, oldValue, newValue)
START_CHANGED

Type: string

END_CHANGED

Type: string

DURATION_CHANGED

dist/datechooser.mjs
DURATION_CHANGED

Type: string

TimeRangeChooser

dist/datechooser.mjs

Combination of two DateTimeChoosers to specify a start and end time. A "change" event is fired when the times are modified.

Initial values can be set via the start, end and duration attributes. Start and end are ISO8601 dates, duration may either be a number of seconds or an ISO8601 duration string. Also, if the prev-next attribute is true, then previous, next and now buttons are added to shift the time range earlier, later or so that the end is the current time.

The component remembers the last changed, so if you modify duration and then modify start, the end is adjusted to keep duration the same.

new TimeRangeChooser()

Extends HTMLElement

Static Members
observedAttributes
Instance Members
toInterval()
getTimeRange()
updateTimeRange(timeRange)
startLabel
endLabel
durationLabel
start
end
duration
duration
_updateDuration(duration)
resyncValues(curChanged)
createPrevNext()
attributeChangedCallback(name, oldValue, newValue)

extractDuration

dist/datechooser.mjs

extracts duration from either string as ISO or number as seconds.

extractDuration(value: any): any
Parameters
value (any) ISO string or number
Returns
any: duration