epos4u Posted August 5, 2014 Posted August 5, 2014 Hi, i am using a UniEdit and would like to enter a currency format how can i check only 1 decimal point is used Many Thanks
Administrators Farshad Mohajeri Posted August 5, 2014 Administrators Posted August 5, 2014 UniNumber Edit
epos4u Posted August 5, 2014 Author Posted August 5, 2014 Hi Farshad, i have tried Uninumber Edit, users can still enter more than 1 decimal point
Sherzod Posted August 5, 2014 Posted August 5, 2014 Hi Farshad, i have tried Uninumber Edit, users can still enter more than 1 decimal point Hi schweppes. You want to say that "decimalPrecision" is not working correctly? Best regards.
Administrators Farshad Mohajeri Posted August 5, 2014 Administrators Posted August 5, 2014 Hmm yes I totally forgot that we have a parameter named decimalPrecision!
epos4u Posted August 5, 2014 Author Posted August 5, 2014 Hi, the decimalPrecision is ok i just want to make sure clients do not enter a decimal seperator more than once. input 12...12 or 12.454.000... etc the decimalPrecision works ok, its just the input
Sherzod Posted August 5, 2014 Posted August 5, 2014 clear ...then try: UniNumberEdit1 -> ClientEvents -> ExtEvents -> Ext.form.field.Number add function keydown function keydown(sender, e, eOpts) { if (e.getKey() == 190 || e.getKey() == 110) { if (sender.getRawValue().indexOf('.') > -1) e.preventDefault(); }; } but it does not work for copy/paste (but it can also be done...)best regards. 2
Recommended Posts