setSelection
Sets a start and end selection dates.
The function expects the dates to be within the state's year-range, and for the start date to appear before, or be equal, the end date. Also, if an end date is provided (e.g. not null
), a start date is also expected to be provided. In any other case, an IllegalArgumentException is thrown.
Parameters
startDateMillis
timestamp in UTC milliseconds from the epoch that represents the start date selection. Provide a null
to indicate no selection.
endDateMillis
timestamp in UTC milliseconds from the epoch that represents the end date selection. Provide a null
to indicate no selection.
Throws
in case the given timestamps do not comply with the expected values specified above.