wireui / wireui

TallStack UI components
https://v1.wireui.dev
MIT License
1.41k stars 166 forks source link

Datetime Picker reverts chosen time from PM to AM and vice versa under certain conditions #705

Closed bcshelton72 closed 1 day ago

bcshelton72 commented 10 months ago

Describe the bug

Under some conditions the Datetime Picker changes an input time from PM to AM, and vice versa. Our team is seeing it happen when all these conditions are met:

  1. The datetime picker has the interval parameter set
  2. A time is manually typed in to the datetime picker with minutes which do not fit the configured interval (example: the interval is 15 and the manually entered time is 12:20).
    • This is only possible by manually typing it into the datetime picker field, since the dropdown options will be limited to values that match the interval.
  3. The manually entered time is within the 12:00 hour. Other hours don't seem to be affected.

To Reproduce Steps to reproduce the behavior:

  1. Add a datetime picker to a blade with the interval parameter set to 15.
  2. View the blade and click the datetime picker.
  3. Instead of choosing one of the dropdown options, in the field manually type 12:20PM.
  4. The time is then displayed in the datetime picker as 12:20AM.
  5. Repeat the previous steps and manually type a time of 12:20AM.
  6. The time is then displayed in the datetime picker as 12:20PM.
  7. Verify other times show this issue as long as they are within the 12:00 hour and have minutes that are not evenly divisible by the interval.
  8. Verify other times work correctly if they are not in the 12:00 hour.

Expected behavior For a datetime picker that has an interval of 15, if a time of 12:20PM is manually entered the value should show as 12:20PM.

Screenshots or Videos Here's a short video showing the behavior.

https://github.com/wireui/wireui/assets/1216642/a61f6eb6-71da-415d-a528-0d4af7afc278

Dependencies

joaopalopes24 commented 1 day ago

Thank you for using WireUi!

We released stable version 2, with new features and improvements. Check if the mentioned problem has been resolved, if not, reopen this issue and we will provide more information. Thank you in advance, we are organizing Issues for better maintenance.