This repository has been archived by the owner on Jul 16, 2022. It is now read-only.
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.
Reason for this patch
My use-case required to have mode where I can easily and quickly select multiple ranges of dates and individual dates, e.g. 12 October till 15 October, 20 October, 28 October till 30 October. Since I couldn't find any good way for this I added such feature myself.
Current state
It is a bit rough in some places but base functionality is working for me, so I've decided to share it and maybe start discussion how this mode can be improved and pushed to main repository. Probably it will also help others in their use-cases.
Please keep in mind I am not JS expert and most likely there few things that can be improved.
Known areas for improvement
Only adding dates works and there is no to remove them. Plan is to allow user to delete dates by clicking while holding a key down. This requires a bit more logic to be developed to split ranges.
There is a high chance of duplicates of dates happening. Some duplicates reduction should be added.