Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Initial commit for new mode "mixed" #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

s-peryt
Copy link

@s-peryt s-peryt commented May 15, 2020

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

  1. 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.

  2. There is a high chance of duplicates of dates happening. Some duplicates reduction should be added.

@nazar-pc
Copy link
Owner

nazar-pc commented Jun 5, 2020

This looks interesting and potentially useful. I think you can actually hack similar functionality multiple mode rather easily by observing how selected dates change. As to the name mixed is vary vague, something like multi-range would be nicer.

I'm only passively maintaining this library, since I'm not using it myself for many years now (mostly doing backend these days). So unless you can finish it and make it such that I can just click merge, chances of me getting back to it and finishing are pretty small.

@nazar-pc nazar-pc assigned nazar-pc and unassigned nazar-pc Jun 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants