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

useSelect, minTime, and required #795

Open
olaulau opened this issue Feb 12, 2024 · 2 comments
Open

useSelect, minTime, and required #795

olaulau opened this issue Feb 12, 2024 · 2 comments

Comments

@olaulau
Copy link

olaulau commented Feb 12, 2024

Hi ;

Here are some small bugs with those jquery-timepicker options :

  • "required" attr is only correctly applied by browser if we don't use "useSelect" option
  • "minTime" is only applied to the list of available values in the list, but not enforced as minimal value . if there was a smaller value set, this value will still be posted
    • in this case, if we add the "useSelect" option, the is no selected value, empty value are posted.
      • if we add "required" attribute, the form isn't posted but we don't see any error (as if the error is on the hidden field)
  • when using "minTime" with "useSelect" and an initial empty value, it selects this minimal value (but it doesn't without "useSelect" option)
  • when using "useSelect", "ui-timepicker-[field_name]" values are posted alongside of "[field_name]" values

Hope this is detailed enough, and you will have some ideas to fix / workaround those bugs.
Thanks.

@olaulau
Copy link
Author

olaulau commented Feb 12, 2024

  • with initial empty value and "useSelect" option, first (minimal) value is automatically selected (empty value cannot be selected, despite the field is required or not). not the same behavior without "useSelect" option.

@olaulau
Copy link
Author

olaulau commented Feb 12, 2024

  • with initial empty value and "useSelect" option, first (minimal) value is automatically selected (empty value cannot be selected, despite the field is required or not). not the same behavior without "useSelect" option.

nevermind, there is a workaround :
noneOption: [""]

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

1 participant