We generate dynamic fields where the user can define their precision (total number of digits) and scale (number of digits to the right of the decimal). We set max length based on precision + 1 for a negative and + 1 for the decimal such that if the user defined a field with precision 7 and scale of 3, the max length would be 9 (7 digits, 1 for potential and 1 for potential decimal). (When the scale is 0, the max length is precision + 1 for potential negative). We need to prevent users from entering more than the precision (e.g., the total number of digits) when entering values, regardless of whether the number is positive or negative as well as whether there's a decimal or not. For example, if the precision is 5 and scale is 3, max length would be 7. 12345 would be valid, as would -12345 or -123.45. However, 123456 or 12345.6 would not.
I have the following wired up (and executing upon keypress), but in traversing the sender object, I am unable to get to the options (where I believe the scale is kept based on this page):
With the above in mind, given a Kendo Numeric Textbox, how does one go about getting the scale via jQuery?
(Something similar to the above worked great when we had RadControls implemented, but isn't functional using Kendo controls.)
Finally, why isn't this functionality supported within the control itself? I find it hard to believe we're the only ones who see this as a shortcoming.