Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
215
Reset Slider Min and Max values client side
posted

I have a slider whose valuetype is DateTime and I would like to reset the slider on the client side. I've tried calling set_value and set_secondaryValue with the min and max values but it throws a javascript error trying to convert to double.

Can you please tell me how to do so if possible.

Here is the aspx declaration of the slider. The min and max values are set in the code behind.

 

 

 

 

 

 

<

 

 

ig:WebSlider ID="InvoiceDateSilder" runat="server" Track-FillValueMode="All" Orientation="Horizontal" CssClass="sliderTopRow" ValueType ="DateTime">

 

 

 

<ClientEvents FormatValueLabel="formatValue"/>

 

 

 

<ValueLabel Location="FloatTopOrLeft" CssClass="halfTransparent" />

 

 

 

<Tickmarks LabelFormatString="M/d/yy">

 

 

 

</Tickmarks>

 

 

 

</ig:WebSlider>

Thanks,

 

  • 215
    posted

    I found the answer. Below is the code to reset the slider on the client side.

     

     

     

     

     

    var slider = $find("InvoiceDateSilder");

     

     

     

    var dt1 = Date.parse(document.getElementById("hdnSliderMinValue").value);

     

     

     

    var dt2 = Date.parse(document.getElementById("hdnSliderMaxValue").value);