How to trigger autosave in a NumericTextbox Kendo UI Scrollbars

959 Views Asked by At

I would like to know how can I do autosave in a Kendo numeric textbox.

I create a little demo, I can do an autosave with normal input text, (autosave when lost focus or 2 sec without entering values), then I add a Kendo UI numeric textbox, works also when I enter some value or lost focus, but, when I change the value in the scrollbars , autosave don´t work.

http://plnkr.co/eD6XGqMkOp7AA1nPAXNu

<h4>Set Value</h4> <p> <input kendo-numeric-text-box ng-model="item.value" style="width: 100%;" required/> </p>

What is missing?

Thank you.

Best regards.

jolynice

1

There are 1 best solutions below

0
What-About-Bob On

Kendo's NumericTextBox does not update the model on the Spin event (the event you are referring to, which fires when you press the up/down arrows).

I encountered the same, annoyed that ng-model was only updated on Blur. My fix was to trigger the Change event on Spin >> Updated Plunker

<input 
    kendo-numeric-text-box="myNumeric" 
    k-on-spin="myNumeric.trigger('change')"
    ng-model="item.value"  />

The Kendo docs offer a slightly different approach.