inputEx - NumberField Usage

Basic NumberField creation

Use the following code to create a basic inputEx NumberField.

			field = new Y.inputEx.NumberField({parentEl: 'container1', showMsg: true, value: 0.03});
			var button = inputEx.cn('button', null, null, 'getValue');
			Y.one(button).on('click',function() {
				alert(field.getValue());
			});
			Y.one('#container1').appendChild(button);
		

Supported format

Everything accepted by parseFloat is valid.

			field2 = new Y.inputEx.NumberField({parentEl: 'container2', showMsg: true, value: '03e-2', required:true, typeInvite:"Float numbers accepted"});
			var button = inputEx.cn('button', null, null, 'getValue');
			Y.one(button).on('click',function() {
				alert(field2.getValue());
			});
			Y.one('#container2').appendChild(button);
		

Min & Max

Check a minimum or a maximum value

            field3 = new Y.inputEx.NumberField({parentEl: 'container3', showMsg: true, min:-15, max:'1e3', typeInvite:"Numbers between -15 and 1e3 (1000) only", size:40});
			   var button = inputEx.cn('button', null, null, 'getValue');
			   Y.one(button).on('click',function() {
			      alert(field3.getValue());
			   });
			   Y.one('#container3').appendChild(button);