Issue with input type number
Opened this issue · 0 comments
Hi my friend,
I think there is an issue in the library with the inputs with type number, I already fixed it in my side.
Let me know how we can do to update the library here.
1.- Add this function in line after createInputText function
var createInputNumber = function (fig) {
var my = {},
self = createInput(fig, my);
self.getType = function () {
return 'number';
};
self.$().on('change keyup keydown', function (e) {
my.publishChange(e, this);
});
return self;
};
2.- Change code by this one in function buildFormInputs
var constructor = fig.constructorOverride || {
button: createInputButton,
text: createInputText,
number: createInputNumber,
url: createInputURL,
email: createInputEmail,
password: createInputPassword,
range: createInputRange,
textarea: createInputTextarea,
select: createInputSelect,
'select[multiple]': createInputMultipleSelect,
radio: createInputRadio,
checkbox: createInputCheckbox,
file: createInputFile,
'file[multiple]': createInputMultipleFile,
hidden: createInputHidden
};
3.- This is the right way but it can be fixed just adding the following at the end of the function buildFormInputs:
addInputsBasic('number', 'input[type="number"]');
Regards,
Yosbanis Perez
Developer
City of Miami Government
yob171182@gmail.com