Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > Slider > Broken Slider in IE8 with jquery validation

Not answered Broken Slider in IE8 with jquery validation

Feed from this thread
  • Deyan avatar

    Posted on Feb 15, 2012 (permalink)

    We are using your latest Slider with jquery-1.7.1 and jQuery Validation Plugin 1.9.0.
    The slider is in tabstrip and when submitting, the form is not valid with error 
    "Въведеното число трябва да е между NaN и NaN".
     Declaration of Sliders is :
     @(Html.Telerik().Slider<int>()
                  .Name(ViewData.TemplateInfo.HtmlFieldPrefix)
                  .Min(4)
                  .Max(20)
                  .SmallStep(5)
                  .LargeStep(10)
                  .Orientation(SliderOrientation.Horizontal)
                  .TickPlacement(SliderTickPlacement.TopLeft)
                  .ShowButtons(true)
                  .Value(Model)
                  )
    The problem is only with IE.

    Reply

  • Alexander Valchev Alexander Valchev admin's avatar

    Posted on Feb 17, 2012 (permalink)

    Hi Deyan,

    I tried to reproduce your case, but to no avail. It would be best if you could send a working demo that could be examined in closer details. Please provide such project and we will check it right away.

    Thank you in advance.

    All the best,
    Alexander Valchev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Dmitry avatar

    Posted on Mar 11, 2012 (permalink)

    I have the same issue with Slider in IE9.

    It is not easy to send complete solution, but in my case we have clien-side wizard(slider is on the first page) with JQuery validation call on clicking "Next/Submit" button.
    $("#next-step").click(function () {
     
        var $step = $(".wizard-step:visible"); // get current step
     
        var validator = $("form").validate(); // obtain validator
        var anyError = false;
     
        var validableElements = $.merge($step.find("input"), $step.find("textarea"));
        validableElements.each(function () {
            if (!validator.element(this)) { // validate every input element inside this step
                anyError = true;
            }
        });
     
        if (anyError)
            return; // exit if any error found
     
        if ($step.next().hasClass("wizard-step")) { // is there any next step?
            $step.hide().next().fadeIn(); // show it and hide current step
            //                $("#back-step").show(); // recall to show backStep button
            showWizardButtons();
        }
    });

    The issue is in the code:
    if (!validator.element(this)) { // validate every input element inside this step
          anyError = true;
      }

    Slider input returns false in IE9, although i can't imaging invalid state for slider :-)

    Reply

  • Alexander Valchev Alexander Valchev admin's avatar

    Posted on Mar 14, 2012 (permalink)

    Hi Dmitry,

    I believe the problem is caused by the jQuery validator behaviour - it returns false if the browser does not support range type inputs. A possible solution is to ignore slider inputs through the validator settings. For example:
    $(document).ready(function () {
        var validator = $('form').data('validator');
        validator.settings.ignore = '[type=range]';
    });

    I hope this information will help you to solve the problem.

    All the best,
    Alexander Valchev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > Slider > Broken Slider in IE8 with jquery validation
Related resources for "Broken Slider in IE8 with jquery validation"

ASP.NET MVC Slider Features  |  Documentation  |  Demos  |  Telerik TV ]