Create a variable called startY, and set that to Mouse.Y when the user starts dragging the slider.
When the slider is released set hours to hours + (((Mouse.Y - startY) / 20) * 0.25)
Mouse.Y - startY gets the difference in pixels the slider has moved from start to finish.
Then you get how many 20's are in that value, and multiply it by 0.25
If you want to clamp the slider to a maximum/minimum value, replace Mouse.Y with Slider.Y and restrain that objects position.