HOURMIN_ELEMENT

src/datechooser.ts
HOURMIN_ELEMENT

Type: string

DATETIME_ELEMENT

src/datechooser.ts
DATETIME_ELEMENT

Type: string

TIMERANGE_ELEMENT

src/datechooser.ts
TIMERANGE_ELEMENT

Type: string

hourMinRegEx
HOUR_MIN_24

Type: string

START_LABEL

Type: string

DEFAULT_START_LABEL

src/datechooser.ts
DEFAULT_START_LABEL

Type: string

END_LABEL

Type: string

DEFAULT_END_LABEL

src/datechooser.ts
DEFAULT_END_LABEL

Type: string

DUR_LABEL

Type: string

DEFAULT_DUR_LABEL

src/datechooser.ts
DEFAULT_DUR_LABEL

Type: string

HourMinChooser

src/datechooser.ts

Hour and Minute chooser. Use as ''

new HourMinChooser()

Extends HTMLElement

Instance Members
_time
updateCallback
popupDiv
showHide()
hide()
show()
asDuration
time
time
_internalSetTime(dt)

DateTimeChooser

src/datechooser.ts

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

new DateTimeChooser(time: DateTime?)

Extends HTMLElement

Parameters
time (DateTime?)
Static Members
observedAttributes
Instance Members
_time
updateCallback
updateTime(newTime)
timeModified()
time
time

START_CHANGED

src/datechooser.ts
START_CHANGED

Type: string

END_CHANGED

Type: string

DURATION_CHANGED

src/datechooser.ts
DURATION_CHANGED

Type: string

TimeRangeChooser

src/datechooser.ts

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
updateCallback
_duration
startChooser
endChooser
_mostRecentChanged
toInterval()
getTimeRange()
updateTimeRange(timeRange)
startLabel
endLabel
durationLabel
start
start
end
end
duration
duration
_updateDuration(duration)
resyncValues(curChanged)

extractDuration

src/datechooser.ts

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

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