RadzenNumeric - 0 Min/Max ignored on direct input #470

Open
opened 2026-01-29 17:37:50 +00:00 by claunia · 0 comments
Owner

Originally created by @Giroxes on GitHub (Jul 19, 2022).

Describe the bug
RadzenNumeric component is allowing to write negative values directly via keyboard when Min is 0 or positive values when Max is 0.

To Reproduce
Steps to reproduce the behavior:

  1. Create a RadzenNumeric component
  2. Set Min property to 0
  3. On execution, try to write a negative number with the numeric pad
  4. See error

Expected behavior
Min/Max 0 values should work normally

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows, Linux
  • Browser chrome
  • Version 3.19.7

Additional context
0 values will always be false in Javascript. The fix should as simple as change if (min && [...] to if (min != null && [...]

Originally created by @Giroxes on GitHub (Jul 19, 2022). <!-- IMPORTANT: Read this first!!! 1. If you own a Radzen Professional or Еnterprise subscription you can report your issue or ask us a question via email at info@radzen.com. Radzen staff will reply within 24 hours (Professional) or 16 hours (Enterprise) 2. The Radzen staff guarantees a response to issues in this repo only to paid subscribers. 3. If you have a HOW TO question start a new forum thread in the Radzen Community forum: https://forum.radzen.com. Radzen staff will close issues that are HOWTO questions. 4. Please adhere to the issue template. Specify all the steps required to reproduce the issue or link a project which reproduces it easily (without requiring extra steps such as restoring a database). --> **Describe the bug** RadzenNumeric component is allowing to write negative values directly via keyboard when Min is 0 or positive values when Max is 0. **To Reproduce** Steps to reproduce the behavior: 1. Create a RadzenNumeric component 2. Set Min property to 0 3. On execution, try to write a negative number with the numeric pad 4. See error **Expected behavior** Min/Max 0 values should work normally **Screenshots** ![image](https://user-images.githubusercontent.com/6807470/179693448-18c8b6dd-584d-4d9e-9d55-245552853c3c.png) **Desktop (please complete the following information):** - OS: Windows, Linux - Browser chrome - Version 3.19.7 **Additional context** `0` values will always be `false` in Javascript. The fix should as simple as change `if (min && [...]` to `if (min != null && [...]`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#470