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

feat: TimeField component #529

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

HBS999
Copy link
Contributor

@HBS999 HBS999 commented Nov 16, 2024

This PR adds a new TimeField component.

Closes #317

Copy link

netlify bot commented Nov 16, 2024

👷 Deploy request for kobalte pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 50941a9

@HBS999
Copy link
Contributor Author

HBS999 commented Nov 17, 2024

I dont see how the failed tests are related to this PR. Looks like a flaky test. It passes now.

Copy link
Member

@jer3m01 jer3m01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, mostly looks good!

Small changes required;

The time zone segment shouldn't be interactive since we can change it.
image
AM should be the last highlighted item when you move right.

For arrow interaction the min and max should probably not inc/decrement when out of bounds. The warning should only appear if an invalid time is manually typed.
image

Placeholder doesn't seem to work (W11 FF 132.0.2):
image

Lastly the hidden input should follow changes to it, this is done to allow browser form autofill and cache. More info below.

packages/core/src/time-field/time-field-hidden-input.tsx Outdated Show resolved Hide resolved
packages/core/src/time-field/time-field-hidden-input.tsx Outdated Show resolved Hide resolved
@HBS999
Copy link
Contributor Author

HBS999 commented Nov 18, 2024

Hey Jeremy, thanks for the review!

Placeholder doesn't seem to work (W11 FF 132.0.2):

When you increment the hour, it doesn’t start at 9?

@jer3m01
Copy link
Member

jer3m01 commented Nov 18, 2024

When you increment the hour, it doesn’t start at 9?

Yeah it does, I still think it would be good to also make it display the placeholder in gray (and become a value on first interact).

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

Successfully merging this pull request may close these issues.

[Component] TimeField
2 participants