-
Notifications
You must be signed in to change notification settings - Fork 1.4k
-
Hello,
Your MASK code is very nice and useful.
Thanks for sharing with us.
I want to specify the minimum and maximum values of the numbers entered in an input field.
Is it possible?
Sample Code
$('#kisi').mask("###.###.###", {reverse: true});
$(function () {
$( "#kisi" ).change(function() {
var max = parseInt($(this).attr('max'));
var min = parseInt($(this).attr('min'));
if ($(this).val() > max)
{
$(this).val(max);
}
else if ($(this).val() < min)
{
$(this).val(min);
}
});
});
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment