DateRangeSlider based on RangeSliderBar addon

Vaadin is a great platform for creating web applications and the concept of addon is quite cool.

i liked the RangeSliderBar addon with double selection knob and i found it at the right time when i had a similar requirement. I am using it now to filter routes based on the distance between them.

i also had another requirement to control the result set based on a start and end dates and so i tried using the RangeSliderBar for dates also. though it could produce the slider, the labels are still numbers but not dates :(.

i tried extending the addon, but has the following difficulties.

  1. The LabelFormatter is not an interface and the method formatLabel() is package private and so i can’t extend it to produce different labels.
  2. i think some of the private methods like drawLabel or drawTicks may be made protected.

i successfully extended the addon after modifying the base addon’s source, but it would be good if the author (Lawal Olufowobi) corrects the LabelFormatter implementation.

i may publish the addon once the base addon is updated. (if someone finds useful :grin:)
12164.gif