-
Notifications
You must be signed in to change notification settings - Fork 10.4k
InputTime component with form support #26324
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
Conversation
Thanks for contributing this, @MarvinKlein1508! I notice that the implementation is almost identical to the one for To achieve this, I think we could:
The other benefit of this approach is that we'd get support for What do you think? Also, for to be able to accept the PR, would you be able to add corresponding E2E tests? Please see existing E2E tests in |
thanks for your reply. I was thinking the exact same thing before I created the component. My first approach was addding an enum to InputDate which specifies the control as Date, Time or DateTimeLocal. However I could find a solution to get the correct format syntax within the static methods. I don't think we should provide the possibility to set a specific format. As you previously mentioned here #15400 (comment) the format is always the same. Only the displaying format vary from the browser and culture of the user. For I as a user would also find it confusing if an InputDate Component could also represent time. So I would adopt this component to InputDateTime. This would also show me that I can use other formats here. But to keep existing projects running, I had created an InputTime component from it. I will provide you an E2E test, once I get the solution compiling. Still haven't figured out yet how to get all dependencies. I have followed this guidelines step by step but something seems to be missing on my side. -Marvin |
Just to keep track, this seems to be realated with #12376 |
@MarvinKlein1508 We've been considering this in more detail and think there's a simpler design based on your observations. Since the I know you already raised a concern about the naming, i.e., that it would make more sense for it to be called So to proceed with this, our proposal is:
Does that sound feasible? |
@SteveSandersonMS
Not sure but there is also an input type for week I haven't used this one before so I am not sure whether it is compatible with datetime.
Where should I put them in this repository? Can you link an E2E test for another simple InputComponent? |
Existing E2E tests for the |
Hi @MarvinKlein1508. |
Hi Steve,
As you can see I've added two get only properties: and one new property as parameter called
I also created a short test project to see if everythings works. It turns out that type For example: the validation of time works until 12 hours and 59 minutes. In europe we enter the time until 23 hours and 59 minutes. But I am not sure how this is done correctly (I haven't worked as much with CultureInfo because I only needed to optimise software for our own purposes yet). But I am pretty sure you will know how to change this. |
Hi @MarvinKlein1508. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context. |
This adds an InputTime component which can be used to enter only time values and not just date values.