jQWidgets Forums
jQuery UI Widgets › Forums › Editors › NumberInput › jqxNumberInput and Focus
Tagged: focus, jqxnumberinput, Number Input, setDecimal, val, value
This topic contains 4 replies, has 3 voices, and was last updated by Dimitar 9 years, 1 month ago.
-
AuthorjqxNumberInput and Focus Posts
-
When it is set with an instruction like $(‘#idcontainer .numberInput’).val(’5.23′), the jqxNumberInput component focuses automatically althought it shouldn’t do that.
This functionality should be chosen by the programmer.
I propose to add a flag property that allows to enable or disable the autofocus during the setting of a value.thank you
Fabio
Hello Fabio,
Thank you for your feedback. We will consider changing this behaviour in future versions of jQWidgets.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/My apologies for this actualized after 2 years
Is there any way to avoid getting focus on jqxNumberInput widget.
I am trying to make data-range form whit number input of days.
An idea is to make form whit two jqxDateTimeInput and one jqxNumberInput.
these three is refferenced by eventsIt is little annoying when you are in jqxDateTimeInput user when change day event steel focus from control and set focus on number input.
Is there any chance to avoid geting focus on setting value.$('#brojDana').on('change', function (event){ var value = event.args.value ; console.log(value); var date = $('#doDatuma').jqxDateTimeInput('getDate'); date.setDate(date.getDate() - value ); $('#odDatuma').jqxDateTimeInput('setDate',date); }); $('#odDatuma').on('valueChanged', function (event) { var jsDate = event.args.date; var date = $('#doDatuma').jqxDateTimeInput('getDate'); var diff = Math.floor(( date - jsDate ) / 86400000); console.log(diff); $('#brojDana').jqxNumberInput('setDecimal', diff); }); $('#doDatuma').on('valueChanged', function (event) { var jsDate = event.args.date; var date = $('#odDatuma').jqxDateTimeInput('getDate'); var diff = Math.floor(( jsDate -date ) / 86400000); console.log(diff); $('#brojDana').jqxNumberInput('setDecimal', diff); });
Sory for spamming
here is fiddle
What I trying to doHello adopilot,
Unfortunately, this behaviour cannot be altered. When setDecimal is called, the number input is automatically focused.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.