Skip to content

[Feature Request] In v-number-input limit manual entry to min-max range #19438

Closed
@crystalfp

Description

Problem to solve

In the new VNumberInput widget If I enter a value outside the min-max range I expect it will be changed to a value equal min or max when pushing Enter or widget losing focus. Currently the value is so adjusted only if I push increase/decrease buttons.
Also, if out-of range value is not passed to v-model variable, we have an inconsistency between show value and variable value.

Proposed solution

Add an event listener to Enter key and blur events and check the value against min/max adjusting it before passing to v-model. Adjust visualized value accordingly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

C: VNumberInputT: bugFunctionality that does not work as intended/expected

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    [Feature Request] In v-number-input limit manual entry to min-max range · Issue #19438 · vuetifyjs/vuetify