Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input type number does not support #158

Closed
bishwajitcadhikary opened this issue Mar 2, 2022 · 1 comment
Closed

Input type number does not support #158

bishwajitcadhikary opened this issue Mar 2, 2022 · 1 comment

Comments

@bishwajitcadhikary
Copy link

<input type="number" name="money"/>
does not return value

@pravnkay
Copy link

For this to work,

You can set the type to text and also have a data attribute on your number input fields like, data-convert marking them to be converted to number type.

<input type="text" data-input="convert" />

Once the repeater is initialized, under the show property you can convert them all back to number type like,

$('.repeater').repeater({
  initEmpty: true,
  show: function () {
    // changing the manual input fields of number type to number type from text
    repeater.find('input[data-input="convert"]').removeAttr('type').attr('type',"number")

    //continue...

At least, that's how I do it for now.

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

No branches or pull requests

2 participants