Widget Tricks - ods-date-range-slider

Range slider by day

From and to selectors to easily catch a range of date for your dashboards.

Range slider by year

From and to selectors to easily catch a range of date for your dashboards.

Custom colors

The range and the selectors colors can be overridden with some CSS.

Automatic initial bounds - based on the data

Get the date range of the data, and use it to automatically set initial bounds.

It combines an ods-analysis to get the range, the ods-date-range-slider, and some AngularJs expression to activate a “reset range button”.

Note1: Two contexts are used, one for the page, and one specific to get the date range.

Note2: the date field id in this example is date_start

Note3: Pay attention to the date field precision. This example only work with day precision date fields. See next resources for month and year precision fields.

Automatic initial bounds - month precision

Same as the previous example, but for month precision date field.

Automatic initial bounds - year precision

Same as the previous example, but for year precision date field.