0.12.0 • Published 4 years ago

d2l-insights-daterange-input v0.12.0

Weekly downloads
5
License
Apache-2.0
Repository
-
Last release
4 years ago

d2l-insights-daterange-input

NPM version Build status

Overview

This library contains the date range input control.

API Docs

init(parentElement, defaultStartTimestamp, defaultEndTimestamp, timezone, fnVerifyAndSetCustomDateRange)

Please note: the signature of this function has changed in v0.11.0.

Perform initialization of the widget and hook up events on the page element, be aware of memory leak since there's no unhook of the events.

  • parentElement The parent element that contains the widget, the content of the element will be populated with the HTML structure of this widget

  • defaultStartTimestamp The defaultStartTimestamp of the widget, expected to be a timestamp in milliseconds.

  • defaultEndTimestamp The defaultEndDate of the widget, expected to be a timestamp in milliseconds.

  • timezone The timezone used to represent dates, e.g. America/Toronto or Australia/Hobart. Defaults to UTC

  • fnVerifyAndSetCustomDateRange(startTimestamp, endTimestamp).

A callback function which will get called whenever the date input is changed. It will be called with the startTime and endTime as parameter (in milliSeconds). The startTime and endTime should be already verified by the module by then.

updateDateValues(startTimestamp, endTimestamp)

Update the date values of the widget with startTimestamp and endTimestamp, the update will trigger the verification and update event, and the callback will be called.

render(parentElementId)

Populate page element with parentElementId with the HTML structure of this widget. You are expected to call render(parentElementId) before calling init() with same parentElementId.

0.12.0

4 years ago

0.10.0

8 years ago

0.9.0

8 years ago

0.8.0

8 years ago

0.7.0

8 years ago

0.6.0

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago