We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to display input-field with value

The ejSlider-Control hides the input-field and only displays the current value when the thumb is moved. I did not find a setting to always display the value.

Playing around in the browser's console, I found that I can make the input visible using 

$("input[name='foo']").attr("type","number");

But it then overlaps the scale. I guess it could fiddle more to separate the fields, make the input readonly etc. - but maybe there are hurdles I didn't think of, or maybe someone has already found a way to do that - or maybe I am missing a switch somewhere. So I thought I'll better ask here before starting out... ;-)


3 Replies

KR Karthik Ravichandran Syncfusion Team June 14, 2016 01:50 PM UTC

Hi Michael,

We have analysed your query. We would like to inform you that, we have maintained some UI standards for slider control and also we are maintaining the slider values in the hidden input element, you can get the value in form post back process.
Please let us know that the provided information is helps you to achieve your requirement. If not, please get back to us with more information.

Regards
Karthik R 
 


MB Michael Baas June 14, 2016 02:38 PM UTC

Thank you - I know that the hidden input is there - but I would like it to be visible so that the user knows what the slider's current value is (without having to touch it...)


KR Karthik Ravichandran Syncfusion Team June 15, 2016 01:04 PM UTC

Hi Michael,

Thanks for your update.

We have analyzed your query (’
I would like it to be visible so that the user knows what the slider's current value). We can achieve your requirement in slider using change and slide events.
Please refer the below code sample.


 
[Html]

<div id="Slider"> </div>

<
input type="text" class="e-textbox" id="result" value="0" />

 
[Script]

$("#Slider").ejSlider({ 
    change: "onchange", 
    slide: "onchange" 
});

function onchange(args) {
    $(
"#result").val(args.value) 
} 


For your reference, we have prepared the sample based on your requirement,please refer the below link:
 http://jsplayground.syncfusion.com/nce5jrcf

Please let us know that the provided information is helps you to achieve your requirement. If not please get back to us with more information.

Regards
Karthik R
 


Loader.
Up arrow icon