How can I use a jQuery UI Spinner widget in Knockout bound input?
<tbody data-bind="foreach: orders">
<tr>
<td data-bind="text: Name"></td>
<td><input type="number" style="width: 100px;" data-bind="value: Price" /></td>
<td><input type="number" style="width: 50px;" data-bind="value: VAT" /></td>
<td><input type="number" style="width: 50px;" data-bind="value: Number" /></td>
<td data-bind="text: Final()"></td>
<td><a href="javascript:void(0);" data-bind="click: $root.removeOrder">Remove</a></td>
</tr>
</tbody>
The best way is to create
custom bindingto bindspinnerto the input:And then just use it instead of
valuebinding:Here is working fiddle: http://jsfiddle.net/vyshniakov/SwKGb/