0

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

Sourabh Kumar Sharma
  • 2,864
  • 3
  • 25
  • 33
jolynice
  • 514
  • 1
  • 8
  • 25

1 Answers1

0

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.

What-About-Bob
  • 649
  • 5
  • 13