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

Event after the DatePicker component is selected #5064

Closed
He-Wu opened this issue Oct 14, 2023 · 1 comment
Closed

Event after the DatePicker component is selected #5064

He-Wu opened this issue Oct 14, 2023 · 1 comment
Labels
Type: Feature ⚙ Request or idea for a new feature.

Comments

@He-Wu
Copy link

He-Wu commented Oct 14, 2023

Is your feature request related to a problem? Please describe.
I am using the DatePicker component to complete the date range selection function. I use the DatesChanged event to trigger the event every time I select a time. The parameter of the event is an array with only the selected time, which is not a range time array.
my code:
<DatePicker Dates="new List<DateTime?>{context.StartDate,context.EndDate}" DatesChanged="arr=>DatesChanged(arr,context)" TValue="DateTime?" InputMode="DateInputMode.Date" SelectionMode="DateInputSelectionMode.Range" />

private Task DatesChanged(IReadOnlyList<DateTime?> dates, GetStockInAndOutNoticesInput input) { input.StartDate=dates.FirstOrDefault(); input.EndDate = dates.LastOrDefault(); return Task.CompletedTask; }

Describe the solution you'd like
I hope that an event will be triggered after I select the start time and end time, but I cannot find this event, or there will be a confirmation button at the end of the time range selection for me to To trigger this event,

Additional context

image
image

@He-Wu He-Wu added the Type: Feature ⚙ Request or idea for a new feature. label Oct 14, 2023
@He-Wu
Copy link
Author

He-Wu commented Oct 17, 2023

I found another way

@He-Wu He-Wu closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant