Repository: bokeh/bokeh

Issue:
RangeSlider needed (again).
Sorry for creating another issue for a range slider. I was asking if it was possible to add a range slider for numbers in my previous issue but I was pointed to a normal slider instead. The range slider I was asking for look like this http://jqueryui.com/slider/#range. Is it possible to add a range slider like the one in the example to bokeh widgets?



Discussion:
This is not implemented yet.

@damianavila FYI this is probably ~20 lines of code to add to the existing range slider, we can probably get to it sooner. 

@damianavila @bryevdv Thanks so much. 

Ideally it would be based on a `Range1d` model, which one could, for example, specify as the `x_range` on a plot to get automatic synchronization.


Resolving patch:
diff --git a/bokeh/models/widgets/inputs.py b/bokeh/models/widgets/inputs.py
--- a/bokeh/models/widgets/inputs.py
+++ b/bokeh/models/widgets/inputs.py
@@ -139,6 +139,50 @@ class Slider(InputWidget):
        The `mouseup` policy is intended for scenarios in which the callback is expensive in time.
     """)
 
+class RangeSlider(InputWidget):
+    """ Range-slider based range selection widget
+
+    """
+
+    range = Tuple(Float, Float, default=(0.1, 0.9), help="""
+    Initial or selected range.
+    """)
+
+    start = Float(default=0, help="""
+    The minimum allowable value.
+    """)
+
+    end = Float(default=1, help="""
+    The maximum allowable value.
+    """)
+
+    step = Float(default=0.1, help="""
+    The step between consecutive values.
+    """)
+
+    orientation = Enum("horizontal", "vertical", help="""
+    Orient the slider either horizontally (default) or vertically.
+    """)
+
+    callback = Instance(Callback, help="""
+    A callback to run in the browser whenever the current Slider value changes.
+    """)
+
+    callback_throttle = Float(default=200, help="""
+    Number of microseconds to pause between callback calls as the slider is moved.
+    """)
+
+    callback_policy = Enum(SliderCallbackPolicy, default="throttle", help="""
+    When the callback is initiated. This parameter can take on only one of three options:
+
+       "continuous": the callback will be executed immediately for each movement of the slider
+       "throttle": the callback will be executed at most every ``callback_throttle`` milliseconds.
+       "mouseup": the callback will be executed only once when the slider is released.
+
+       The `mouseup` policy is intended for scenarios in which the callback is expensive in time.
+    """)
+
+
 class DateRangeSlider(InputWidget):
     """ Slider-based date range selection widget.
 
diff --git a/sphinx/source/docs/user_guide/source_examples/interaction_range_slider.py b/sphinx/source/docs/user_guide/source_examples/interaction_range_slider.py
new file mode 100644
--- /dev/null
+++ b/sphinx/source/docs/user_guide/source_examples/interaction_range_slider.py
@@ -0,0 +1,9 @@
+from bokeh.io import output_file, show
+from bokeh.layouts import widgetbox
+from bokeh.models.widgets import RangeSlider
+
+output_file("range_slider.html")
+
+range_slider = RangeSlider(start=0, end=10, range=(1,9), step=.1, title="Stuff")
+
+show(widgetbox(range_slider))


Test patch: