question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slide limit based on another slider value

See original GitHub issue

Hi, I’m trying set a limit on a second slider (car_loan_excess) based on the current value of another slider (car_loan_amount). I don’t want the second slider to extend above the main slider value. I tried using the MaxLimit but that didn’t do anything (maxLimit: car_loan_amount), so I’m not sure if this is possible. Any suggestions?

$scope.car_loan_amount = {
    minValue: 25000,
    options: {
      floor: 500,
      ceil: 50000,
      step: 500,
      precision: 0,
      draggableRange: false,
      showSelectionBar: false,
      hideLimitLabels: false,
      readOnly: false,
      disabled: false,
      showTicks: false,
      showTicksValues: false
    }
  };
  $scope.car_loan_excess = {
    minValue: 0,
    options: {
      floor: 0,
      ceil: 50000,
      step: 500,
      precision: 0,
      maxLimit: car_loan_amount,
      draggableRange: false,
      showSelectionBar: false,
      hideLimitLabels: false,
      readOnly: false,
      disabled: false,
      showTicks: false,
      showTicksValues: false
    }
  };

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ValentinHcommented, Jul 4, 2016

It’s because your code was outside the controller scope (in a new div), working example: http://jsfiddle.net/rh9u8xcd/

1reaction
haurscommented, Jul 4, 2016

Thanks a lot Valentin! Got it working now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Limit range of one slider to the other slider's value on a two ...
I'm trying to add a third slide on the control so that the middle slide has it's max limit set by the upper...
Read more >
Limit jQuery slider to the value of another slider - Stack Overflow
I needed to restrict one based on the value of another so that they didn't overlap. I came up with the code below....
Read more >
How can I set sliders to values outside the limits allowed by ...
It just seems clunky to add another modifier. How can I set a value slider such as the subserf setting higher than it...
Read more >
How to make if limit is reached then make sliders only slide ...
How to make if limit is reached then make sliders only slide back in ui (not ... limit is 10) and player can...
Read more >
How to limit number of items in gallery with slider
my question is: how can I reduce the number of items displayed in the gallery based on the value of Slider. ( I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found