epos4u Posted August 5, 2014 Share 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 Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 5, 2014 Administrators Share Posted August 5, 2014 UniNumber Edit Link to comment Share on other sites More sharing options...
epos4u Posted August 5, 2014 Author Share Posted August 5, 2014 Hi Farshad, i have tried Uninumber Edit, users can still enter more than 1 decimal point Link to comment Share on other sites More sharing options...
Sherzod Posted August 5, 2014 Share 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. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 5, 2014 Administrators Share Posted August 5, 2014 Hmm yes I totally forgot that we have a parameter named decimalPrecision! Link to comment Share on other sites More sharing options...
epos4u Posted August 5, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
Sherzod Posted August 5, 2014 Share 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 Link to comment Share on other sites More sharing options...
epos4u Posted August 5, 2014 Author Share Posted August 5, 2014 Thank You Link to comment Share on other sites More sharing options...
Recommended Posts