
Show HN: Daterangepicker for jQuery and Knockout - petethepig
https://github.com/sensortower/daterangepicker
======
shostack
Nice!

This is an aspect of UI that seemingly goes overlooked in many analytics/ad
platforms I've used. It is amazing how painful it can be to select your date
range when that is one of the most commonly performed tasks for reporting.

Have you given thought to the other common approach of dragging to select a
date range? Most of the issues I've seen with those implementations tend to be
around the fact that the visible range of dates to drag/select does not scroll
when you move your mouse off to the side or something similar. So if the max
date you want is not displayed, the ability to scroll to select breaks.

Not sure when they yanked it, but an older version of Google Analytics[1] had
the ability to drag a slider on a linear timeline that had a transparent chart
of event volume during that time. I LOVED it because you could easily refine
your selection to a date range where there was a spike in activity for
example.

That was a much more specific and tailored implementation, and I understand
this is meant to be more general, but just a thought to consider.

[1]
[https://techwyse.com/blog/images/GoogleAnalyticsWeeklyQuickT...](https://techwyse.com/blog/images/GoogleAnalyticsWeeklyQuickTipUnderstandi_6103/image_thumb_4.png)

~~~
petethepig
Yeah, I think part of it is that it's hard to implement properly & programmers
don't typically enjoy working with time.

The main focus of this project is on: 1) day / week / month / quarter / year
selection 2) proper timezone, Monday / Sunday start of the week support 3)
stable maintainable codebase

That GA implementation is indeed much more specific and tailored. I think it's
another problem with these calendar components — even though it seems like a
very trivial UI thing, it is still hard to generalize.

------
huckyaus
Keen to try this out.

Could you clarify whether Knockout is always required? The docs show examples
that don't use any KO-specific code, but the readme lists it as a dependency.

~~~
petethepig
It does require Knockout (~22kb) to work.

There's also a knockout binding that is there to help you integrate the
component with existing knockout apps.

But you can also use it with any other framework through jQuery integration.

