Add script to support <input type="text" inputmode="numeric">

This commit is contained in:
Kijin Sung 2025-06-15 01:33:35 +09:00
parent d7fb2422fe
commit 0ea9778682
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,7 @@
'use strict';
$(function() {
$('input.rx_ev_number').on('input', function() {
this.value = this.value.replace(/[^0-9]/g, '');
});
});

View file

@ -17,6 +17,7 @@
@readonly(toBool($definition->is_readonly))
/>
@elseif ($type === 'number')
@load('../assets/number.js')
<input type="text" inputmode="numeric" name="{{ $input_name }}"
id="{{ $input_id }}"|if="$input_id" class="number rx_ev_number"
style="{{ $definition->style }}"|if="$definition->style"