Formating string
Is there a list for the formating strings(display mask) on this site? There are examples of how to do a date format, but what about text formating and number formating? Thnx.
Wai
January 31,
var num = new AW.Formats.Number;
num.setTextFormat("$ #,###.##");
var obj = new AW.UI.Input;
obj.setControlFormat(num);
obj.setControlValue(29.01);
obj.setControlText(function(){
var value = this.getControlValue();
var format = this.getControlFormat();
return format.valueToText(value);
});
document.write(obj);
obj.onControlValidated = function(text){
var format = this.getControlFormat();
var value = format.textToValue(text);
var final = format.valueToText(value);
this.setControlValue(value);
this.setControlText(final);
};
This topic is archived.
ActiveWidgets is a javascript library for creating user interfaces. It offers excellent performance for complex screens while staying simple, compact and easy to learn. Deployed by thousands of commercial customers in more than 70 countries worldwide.
Copyright © ActiveWidgets 2021