Opened 15 years ago

Closed 14 years ago

Last modified 10 years ago

#2993 closed enhancement (wontfix)

"minRange" option for ui slider

Reported by: [email protected] 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)

Change History (5)

comment:1 Changed 15 years ago by rdworth


comment:2 Changed 15 years ago by paul

Milestone: 1.5.2

comment:3 Changed 14 years ago by Cloudream

Milestone: TDB
Status: newassigned

comment:4 Changed 14 years ago by rdworth

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); }

comment:5 Changed 10 years ago by Scott González

Milestone: TBD

Milestone TBD deleted

Note: See TracTickets for help on using tickets.