Skip to content

Conversation

omerorhan
Copy link

take number type of inputs as integer

take number type of inputs as integer
@@ -84,6 +84,8 @@
switch ($('[name="' + pair.name + '"]', $form).attr("type")) {
case "checkbox":
return pair.value === "on" ? true : pair.value;
case "number":
return pair.value = parseInt(pair.value);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, it can be also float, so parseFloat() is better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants