Skip to main content

Search and Top Navigation

#2993 closed enhancement (wontfix)

Opened June 11, 2008 11:36PM UTC

Closed March 21, 2009 05:56PM UTC

Last modified October 11, 2012 09:15PM UTC

"minRange" option for ui slider

Reported by: Owned by: paul
Priority: major Milestone:
Component: ui.slider Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

It'd be nice to have a "minRange" option added to the ui slider that will enforce a minimum distance between 2 handles of a slider. Like the behavior of the YUI slider here:

API link (has the minrange option):

I think the minRange option would be specified in terms of steps (e.g. 1 step spacing, 2 step spacing) and/or value (e.g. the 2 handles should always have a minimum range between them of X)

Attachments (0)
Change History (5)

Changed June 26, 2008 07:49PM UTC by rdworth comment:1


Changed July 10, 2008 08:49PM UTC by paul comment:2

milestone: 1.5.2

Changed August 16, 2008 04:10PM UTC by Cloudream comment:3

milestone: → TDB
status: newassigned

Changed March 21, 2009 05:56PM UTC by rdworth comment:4

resolution: → wontfix
status: assignedclosed

This is possible (as of 1.7) by using the slide event. Returning false will prevent a slide, so you can compare the values and return false if they are too close. For example:

  range: true,
  values: [25, 75],
  slide: function(event, ui) { return (ui.values[1] - ui.values[0] > 5); }

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:5

milestone: TBD

Milestone TBD deleted