I have a input group with a field called 'hours', this field can be changed either using -/+ buttons on each side of the field, or by manually typing in the field.
When using the -/+ button the value is updated correctly, but I cannot get it to update when the user types in the value manually in the input box.
Due to the setup I cant use subscribe, since that is triggered when the buttons change the values too. Is there some way I can solve this?
Code (functions 'subHours' and 'addHours' just adds -/+ 1 to the current value):
<div class="input-group">\
<span class="input-group-btn">\
<button type="button" class="btn btn-default" data-bind="click: subHours">\
<span class="glyphicon glyphicon-minus"></span>\
</button>\
</span><input type="text" class="form-control" data-bind="textInput: hours"/>\
<span class="input-group-btn">\
<button type="button" class="btn btn-default" data-bind="click: addHours">\
<span class="glyphicon glyphicon-plus"></span>\
</button>\
</span>\
</div>\
I would like to call a function in a similar way to when a button is clicked.