forked from Kispi/Core
feat(webapp): add minimum and maximum amount for currency input
This commit is contained in:
parent
f255ffcd94
commit
46d0ad8770
2 changed files with 5 additions and 0 deletions
|
@ -5,6 +5,8 @@
|
|||
type="number"
|
||||
class="text-right pr-16"
|
||||
step="1"
|
||||
min="1"
|
||||
max="100"
|
||||
/>
|
||||
<span class="text-sm opacity-50 absolute -ml-16 top-2/4 -mt-8 pointer-events-none">,00 Öro</span>
|
||||
</div>
|
||||
|
|
|
@ -72,6 +72,9 @@ function handleOpen(event: {id: string, open: boolean}) {
|
|||
}
|
||||
|
||||
function handleSubmit() {
|
||||
if(input.value.$refs.input.$refs.input.value <= 0 || input.value.$refs.input.$refs.input.value > 100) {
|
||||
return;
|
||||
}
|
||||
emit('submit', input.value.$refs.input.$refs.input.value);
|
||||
abortButton.value.click();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue