feat: add new edgesOnly
to return only start/end dates in selection range
#275
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
multiple-ranged
, it will by default push all the range dates in thesettings.selected.dates
, however in some cases we are sometime only interested in the Start/End dates (first & last). For example, if we have a range of Jan 1st to Feb 28, it will push 59 days to thesettings.selected.dates
array, however withedgesOnly
, it will only push 2 dates in the array which are equal to the Start/End datesBelow is an example making a date range selection which starts on April 4th and ends on April 14th
with
edgesOnly: true
, it will return only 2 dates in the array, the start & ending dates. I can then call this simple line of code to retrieve start/end datesconst [start, end] = self.selectedDates;
but without
edgesOnly
(false
orundefined
which is the default), it will return all dates in the array