This is a migrated thread and some comments may be shown as answers.

Maximum range value of the slider

5 Answers 289 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Pavan
Top achievements
Rank 1
Pavan asked on 06 Aug 2012, 09:22 AM
Hello,
Telerik team,

I am facing an issue while I am setting the maximum and minimum value of the slider, If i set minimum value as 0 and maximum value as 40000000 the page doesn't load at all. Here is the code below :

 var MInvestmentTarget = $("#MInvestmentTarget").kendoSlider({   
                    min: 0,
                    max: 40000000,
                    tickPlacement: "none",
                    showButtons: false
                }).data("kendoSlider"),
                    MInvestmentTarget = function (e) {
                        if (e.type != "keypress" || kendo.keys.ENTER == e.keyCode) {
                            var value = parseInt($("#InvestmentTargettxtBoxValue").val());
                            if (isNaN(value) || value < 0 || value > 40000000){
                                alert("Value must be a number between 0 and 40000000");
                                return;
                            }
                            MInvestmentTarget.value(value);
                        }
 }; 

The page takes a long time to load in any of the browser and finally it crashes.

If I give the maximum value as 4000000, it works perfectly fine. The page loads properly.

So I want to know if there is a limit on the Maximum value that can be given for the slider ?
Or is it a mistake in the code which is causing this error.

Awaiting your response

Thanks 
Pavan
                   

5 Answers, 1 is accepted

Sort by
0
raj
Top achievements
Rank 1
answered on 06 Aug 2012, 12:00 PM

Hi

 Same here..Any help from Telerik?

0
Murali
Top achievements
Rank 1
answered on 06 Aug 2012, 12:10 PM
Hi,


I'm also facing the same problem...
Any help from KendoUI team???


Thanks
0
Tony
Top achievements
Rank 1
answered on 28 Sep 2016, 03:37 PM

I am facing the same problem.

Any solution ??

0
Dimiter Topalov
Telerik team
answered on 03 Oct 2016, 11:54 AM
Hello,

The described behavior is caused by the fact that when the max value is a large number, and smallStep and largeStep options are not set to be in some adequate proportion, it is impossible for the widget to correctly calculate all positions for values between the min and max values.

We are not able to give an estimate of the largest number that can be used without specifying smallStep and largeStep, as this will vary between browsers, and systems, but in all cases it is strongly recommended to set the mentioned configuration options:

http://dojo.telerik.com/OnorU

If the scenario requirements prohibit the suggested approach, a Kendo UI NumericTextBox might be the more suitable widget.

Regards,
Dimiter Topalov
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
0
Tony
Top achievements
Rank 1
answered on 03 Oct 2016, 12:18 PM

Ah ok, thx Dimiter.

so having large steps do solve the problem...

Tags
Slider
Asked by
Pavan
Top achievements
Rank 1
Answers by
raj
Top achievements
Rank 1
Murali
Top achievements
Rank 1
Tony
Top achievements
Rank 1
Dimiter Topalov
Telerik team
Share this question
or