This feature allows you to specify the type of Slider. There are three different types of Slider, Default Slider, Min-Range Slider and Range Slider. By default, Default Slider renders. You can use the SliderType property to choose the type of Slider. Data type of this property is “Enum”
Both Default Slider and Min-Range Slider have same behavior that is used to select a single value. In Min-Range Slider, a shadow is considered from the start value to current handle position. But Range Slider contains two handles that is used to select a range of values and a shadow is considered in between the two handles.
Possible Slider types are as follows,
Property Table for MVC
|SliderType||Default (default value)||It is the default Slider type. It helps to select a single value.|
|MinRange||Use this Slider to select a single value; Displays shadow from the start value to the current value.|
|Range||Use this Slider to select a range of values; Displays shadow in-between the selection range.|
The following steps explains you on how to configure the SliderType property to display Range Slider and MinRange Slider.
- In an VIEW page, specify the helper elements to render the RangeSlider and MinRangeSlider.
// Add this code in your view page @(Html.EJ().Slider("minSlider").SliderType(SlideType.MinRange).Value("60").Width("500")) @(Html.EJ().Slider("rangeSlider").SliderType(SlideType.Range).Values("30,60").Width("500"))
Execute the above code example to render the following output.