AI-generated Key Takeaways
-
The DateSlider is a draggable target that ranges linearly between two dates and displays its value as a label.
-
It can be configured to display dates with various interval sizes, including day, 8-day, and year.
-
The DateSlider can be initialized with start and end dates, an initial value, and a specified interval period.
-
A callback function can be used to fire when the slider's state changes, receiving the current date range and the widget itself.
-
The appearance and functionality of the DateSlider can be further customized through
disabledandstylearguments.
| Usage | Returns |
|---|---|
ui.DateSlider(start, end, value, period, onChange, disabled, style) | ui.DateSlider |
| Argument | Type | Details |
|---|---|---|
start | Date|Number|String, optional | The start date, as a UTC timestamp, date string, or ee.Date. Defaults to one week ago. |
end | Date|Number|String, optional | The end date, as a UTC timestamp, date string, or ee.Date. Defaults to today. |
value | Date|Number|String, optional | The initial value. The value is an array consisting of the start and end date for the selected date range, but for convenience, it can be set by specifying the start date alone. Defaults to yesterday. |
period | Number, optional | The interval size for values on the slider in days. Defaults to one. |
onChange | Function, optional | A callback to fire when the slider's state changes. The callback is passed an ee.DateRange representing the slider's current value and the slider widget. |
disabled | Boolean, optional | Whether the slider is disabled. Defaults to false. |
style | Object, optional | An object of allowed CSS styles with their values to be set for this widget. Defaults to an empty object. |