1

I have implemented the angular js version of kendo.ui.RangeSlider. Below is my code.

HTML

 <div kendo-range-slider="fbaSlider" k-options="fba">

Angular Code

    $scope.fbaStart = 0;
    $scope.fbaEnd = 0;
    $scope.fba = {

    min: 0,
    max: 18,
    smallStep: 1,
    largeStep: 2,
    tickPlacement: "both",
    change: function (e) {
        $scope.fbaStart = e.value[0];
        $scope.fbaEnd = e.value[1];

    }
}

As you can see I have set kendo-range-slider="fbaSlider" in my HTML so I have a reference to the Slider object in my scope and I can access that as $scope.fbaSlider

What I want is to have a button on the page and on its click I want to reset the slider to its initial position.

I tried something like $scope.fbaSlider.options.selectionStart=0. But this did not work. What am I doing wrong. Let me know if any other information is required.

Thanks for your time.

Anshuman Jasrotia
  • 3,135
  • 8
  • 48
  • 81

1 Answers1

5

You can use value or values method.

$scope.fbaSlider.value([0,18]);

or

$scope.fbaSlider.values(0,18);
uygar donduran
  • 1,177
  • 1
  • 9
  • 20