Date Picker allows user to type invalid dates
Describe the bug Date Picker allows user to type invalid dates
To Reproduce Steps to reproduce the behavior:
- Go to https://demos.blazorbootstrap.com/form/date-input
- type invalid date into any DateInput field
- See date being wrong.
Expected behavior Date should not allow invalid numbers
Screenshots
Versions (please complete the following information): Reproducible on your demo site
Sample code Your own site
GitHub repo blazorbootstrap
Desktop (please complete the following information): irrelevant
Smartphone (please complete the following information): irrelevant
Additional context reproducible on your own site
@kevon-vems Thank you for using BlazorBootstrap. Assuming that your local date format is mm/dd/yyyy, that is why it is allowing 02/31/2025. What is your machine locale and date format?
@kevon-vems Please record the screen and share it. This will help us understand your issue better.
You're kidding right? Feb 31 does not exist. Feb has 28 days, and 29 days in a leap year.
The component should understand the concept that a month has anywhere between 28 and 31 days depending on the month and year
@kevon-vems I didn't realize the month and day selected. This is the default behavior of <input type="date" />. I will check.