[FO] kri.form.maxlength 방식 변경
This commit is contained in:
@@ -246,10 +246,15 @@ kri.form.error = function(errorList){
|
||||
}
|
||||
}
|
||||
|
||||
kri.form.maxlength = function(object){
|
||||
if (object.value.length > object.maxLength) {
|
||||
object.value = object.value.slice(0, object.maxLength);
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('body').on('input', 'input[type="number"]', function() {
|
||||
let $el = $(this);
|
||||
if ($el.val().length > $el.attr('maxlength')) {
|
||||
$el.val($el.val().slice(0, $el.attr('maxlength')));
|
||||
}
|
||||
|
||||
if ($el.attr('inputmode') === 'numeric') {
|
||||
$el.val($el.val().replace('.', ''));
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user