chrisdavies / tiny-date-picker

A small, modern, dependency-free date picker
https://chrisdavies.github.io/tiny-date-picker/
415 stars 87 forks source link

Not an issue. Merely a suggestion. #51

Closed frdnrdb closed 7 years ago

frdnrdb commented 7 years ago

Are you considering adding range-functionality? In my opinion this is the cleanest/ most effective approach: http://longbill.github.io/jquery-date-range-picker. It's similar to Bootstrap's and jQuery UI's sollutions, but it's snappier. The downside: It's jQuery dependent.

This guy made a pure JS variant of the afforementioned range-pickers, but it's a bit too much: http://lopezb.com/hoteldatepicker/

Anyway. If your tiny vanilla JS picker gets a snappy range functionality it will definitely be my go-to picker in the future ;-)

Good work!

chrisdavies commented 7 years ago

This isn't a core use case for this library (for me). But I think I could fairly easily build that functionality on top of this lib.

I think I'd prefer it to bind to two different input fields, rather than putting the date range into a single input field the way hoteldatepicker does.

Anyway, interesting suggestion. I'll leave this open until I have time to attempt it.

chrisdavies commented 7 years ago

I had a chance to take a stab at this today.

Here's the demo: http://christophilus.com/tiny-date-picker/date-range.html

And here are the docs: https://github.com/chrisdavies/tiny-date-picker/blob/master/docs/date-range-picker.md

I kept it super minimal.

frdnrdb commented 7 years ago

wow! that was quick! i'll keep my word; your picker is hereby my defdault choice. great work! i'll spread the word :-)

chrisdavies commented 7 years ago

Ha. Well, the range is definitely in alpha. I still need to do a few things: