3

I am trying to use a kendo numeric text box with angular validation (ng-required) however I'm not able to get it working. The ng-required attribute on this element has no effect on the form validation status.

From my understanding, the reason why this doesn't work is because kendo numeric text box uses k-ng-model to store it's value, whereas the angular validation works only with ng-model.

Has anyone else seen this issue, are there any workarounds?

gjarzab
  • 101
  • 1
  • 8

1 Answers1

5

I have found a workaround that involves using the kendo-numeric-text-box along with a hidden input field which makes use of ng-model.

<input data-kendo-numeric-text-box data-k-ng-model="numValue"/>
<input type="hidden" data-ng-model="numValue" data-ng-required="true" />
gjarzab
  • 101
  • 1
  • 8
  • this is genious! this solves so many wired kendo-angular behaviours and limitations. thanks a lot! – Jensen Apr 13 '16 at 11:03