addToRange
adds a date into the existing range
void addToRange(string|Date dates);
dates | string|Date | a date to be added into the range |
Example
// adding the current date into a range
$$("range").addToRange(new Date());
// adding a date as a string
$$("range").addToRange("2017,10,6");
Details
The logic of adding repeats user actions in UI, namely:
- If there's no selection in a Daterange, the new date starts a new range;
- If there's a selected date in a Daterange, the new date is added as a start or end date to finish the range;
- If there's a selected range (2 dates) in a Daterange, the new date starts a new range while the previous one is removed.
Back to top