Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date Picker allows user to type invalid dates #974

Open
kevon-vems opened this issue Dec 10, 2024 · 4 comments
Open

Date Picker allows user to type invalid dates #974

kevon-vems opened this issue Dec 10, 2024 · 4 comments

Comments

@kevon-vems
Copy link

Describe the bug
Date Picker allows user to type invalid dates

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://demos.blazorbootstrap.com/form/date-input
  2. type invalid date into any DateInput field
  3. See date being wrong.

Expected behavior
Date should not allow invalid numbers

Screenshots
image

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

@gvreddy04
Copy link
Contributor

@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?

@gvreddy04
Copy link
Contributor

@kevon-vems Please record the screen and share it. This will help us understand your issue better.

@kevon-vems
Copy link
Author

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

@gvreddy04
Copy link
Contributor

@kevon-vems I didn't realize the month and day selected. This is the default behavior of <input type="date" />. I will check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants