Bounds Are Not Being Set Correctly JQDateRangeSlider
I am using jQDateRangeSlider for a slider between two dates. I am trying to add two bounds, the minimum bound is where the date can't be less than and the maximum bound is the date
Solution 1:
I think what you are looking for is to set the default values. The bounds will only specify the min and max values for the slider, but these values won't show up as selected.
defaultValues: {
min: new Date(2011, 04, 31),
max: new Date(2011, 11, 31)
}
If you want the entire slider to be selected, set the bounds and default values to the same dates.
Here's your updated jsFiddle.
Solution 2:
In JavaScript, months starts with 0 for January to 11 for December. So if you want the bounds to be from May 30, 2011 to November 30, 2011, it should be:
$("#slider").dateRangeSlider({
bounds:{
min: new Date(2011, 4, 30),
max: new Date(2011, 10, 30)
}});
Post a Comment for "Bounds Are Not Being Set Correctly JQDateRangeSlider"