Created
July 30, 2018 04:28
-
-
Save ifirmawan/79a0fc6e11ef2cd19408cbebe08e8443 to your computer and use it in GitHub Desktop.
Input auto format number from https://jsfiddle.net/LM9zZ/2/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$("#formattedNumberField").on('keyup', function(evt){ | |
if (evt.which != 110 ){//not a fullstop | |
var n = parseFloat($(this).val().replace(/\,/g,''),10); | |
$(this).val(n.toLocaleString()); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment