Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you implement a range plugin? #211

Closed
ashokaditya opened this issue Nov 16, 2017 · 16 comments
Closed

How do you implement a range plugin? #211

ashokaditya opened this issue Nov 16, 2017 · 16 comments

Comments

@ashokaditya
Copy link

Similar to this?

https://chmln.github.io/flatpickr/plugins/#rangeplugin-beta

@RobbieTheWagner
Copy link
Owner

RobbieTheWagner commented Nov 16, 2017

@ashokaditya that appears to be in beta, from the docs. Do you need two inputs or do you just want a range picker? You can set mode to range which is specified in the flatpickr docs https://chmln.github.io/flatpickr/options/.

If you really need two inputs or want to implement a custom rangePlugin, I don't think we currently support this. I would definitely be open to supporting this though. Would you be interested in submitting a PR to add this functionality?

@ashokaditya
Copy link
Author

Thanks for your response @rwwagner90

Yes I would require two inputs. It is more intuitive, I think.
Like a From and To date inputs where the To date has to be greater than the chosen From date. Something like you usually see on flight booking apps. Does that make sense?

I would love to create a pull request if you agree :)

Please let me know,
Thanks.

@RobbieTheWagner
Copy link
Owner

@ashokaditya the PR would be just to support range plugins, which should allow you to do whatever sort of ranges you want.

FWIW, you can also do this now without the plugins, but just using two ember-flatpickr instances.

@ashokaditya
Copy link
Author

I'll give it a shot with two instances of ember-flatpicker and let you know how it goes, if that's okay.

@RobbieTheWagner
Copy link
Owner

@ashokaditya not interested in adding support for rangePlugins in a PR? No pressure either way, but we should probably support it, if flatpickr supports it.

@ashokaditya
Copy link
Author

Oh I thought you didn't want me to create a pull request. I think it is a great idea to have the range plugin support :) I would love to create a PR for this. Would you mind telling me how should I proceed?

@RobbieTheWagner
Copy link
Owner

@ashokaditya no, I said you should create a PR. I said:

the PR would be just to support range plugins, which should allow you to do whatever sort of ranges you want.

I definitely want to support all things flatpickr supports. Let me know what you need from me, and I am happy to help!

@ashokaditya
Copy link
Author

@rwwagner90 I'm glad that you agree.
I would like to know what all do I need to include in a pull request?
Is there a specific format you prefer? Or just a simple pull request branch?
If yes, which branch?

Ash.

@RobbieTheWagner
Copy link
Owner

@ashokaditya I don't have anything I require for a PR, but tests would be nice.

@RobbieTheWagner
Copy link
Owner

@ashokaditya any progress on this? Anything I can help with?

@ashokaditya
Copy link
Author

Hi @rwwagner90. I haven't had the time to write tests yet for the PR.
I could use some help with a dummy test file if you could provide one?

Please let me know.
Thanks.

Ash

@RobbieTheWagner
Copy link
Owner

@ashokaditya there are tests already in the repo https://github.com/shipshapecode/ember-flatpickr/tree/master/tests

@RobbieTheWagner
Copy link
Owner

@ashokaditya are you still working on this?

@RobbieTheWagner
Copy link
Owner

@ashokaditya I'm going to assume you are no longer working on this and close the issue. If you would like to work on it more, please let me know.

@ejthan
Copy link

ejthan commented May 12, 2019

I would be very interested to add plugins. However, I'm not quite sure how to implement the class call ('[new weekSelect({})]') without eval().

@RobbieTheWagner
Copy link
Owner

@ejthan I am not familiar with these plugins. What changes do we need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants