I want to implement a date chooser using a JSlider. The user should be able to use the slider to freely choose between two previously known dates. I've seen examples like this one:
But I want to do the same, using only one slider. The minimal distance between two points (tick) should be one day. Any hints how to implement that?
First to answer your question: you can just use a
JSlider
, use the number of days between your start and end date to determine the range, and use custom labels (by using for example thesetLabelTable
method)Now for user-friendliness, avoid this since