Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82249

Odd behavior of numeric fields > 999

$
0
0

I found a weird issue when I'd click on a DataTables row to edit that row's data in Editor. If a numeric field had a value > 999, it would show in Editor as blanks. I traced it back to how I defined the numeric field. I wanted it to have 'type:number' as an attribute, so I first tried this:

{label: 'Pay Rate', name: 'Rate', id: 'Rate', type: 'text', attr:{class:'aNumericField2',type:'number',maxlength:13, min:'0', max:'99999999', step:'0.01'} }

That gives me the odd behavior as noted above. Changing the first instance of type from 'text' to 'number' results in a "SCRIPT5022: SCRIPT5022: Error adding field - unknown field type number." message so I was trying the 'type:number' as an attribute.

The only way I get the normal result of the Editor field displaying correctly was if I dropped the 'type:number' and its related attributes from the definition.

{label: 'Pay Rate', name: 'Rate', id: 'Rate', type: 'text', attr:{class:'aNumericField2',maxlength:13} }

Is there a way to define a numeric field other than as 'type:text'?


Viewing all articles
Browse latest Browse all 82249

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>