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

Premature validation on date inputs #117

Closed
fbeceic opened this issue May 10, 2023 · 0 comments · Fixed by #127
Closed

Premature validation on date inputs #117

fbeceic opened this issue May 10, 2023 · 0 comments · Fixed by #127
Labels
bug Something isn't working

Comments

@fbeceic
Copy link
Collaborator

fbeceic commented May 10, 2023

Basic information

  • Tiller version: 1.6.1
  • Module: date

Bug description

Validation on date inputs triggers for a milisecond when a value is selected from the date/time picker if the previous value is undefined/null in the field. This can disrupt the UX experience on modals, for example, where the whole form shifts for a split second if this occurs (validation message shifts the components).

The cause of this bug is the incorrect detection of blur events on the components, which results wrong value detection.

Example of usage which can cause this bug:

  1. click on the date input with no value
  2. selecting a value on the calendar
  3. blur event triggers
  4. validation triggers and falsely detects an error
  5. new value is set
  6. validation now disappears

List of components: DateInput, DateRangeInput, DateTimeInput, TimeInput

Expected behavior

Validation occurs after the date/time picker is safely closed and the new value is registered inside the field.

Actual behavior

Validation occurs for a split second before the date/time picker is safely closed and the new value is registered inside the field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant