-
Notifications
You must be signed in to change notification settings - Fork 839
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
Add DaySelect event to Day, Week and Month Views #1910
Conversation
Hi @akorchev I've sent in another commit to resolve these issues a few days ago. Is there something else I need to be doing to this PR to move it along? |
@@ -125,6 +125,11 @@ | |||
await Scheduler.SelectSlot(date, date.AddDays(1), AppointmentsInSlot(date, date.AddDays(1))); | |||
} | |||
|
|||
async Task OnDayClick(DateTime day) | |||
{ | |||
await Scheduler.SelectDay(day, AppointmentsInSlot(day.Date, day.Date.AddHours(23).AddMinutes(59).AddSeconds(59))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still feels wrong. Why are you doing it like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. It's should be as simple as
await Scheduler.SelectDay(day, AppointmentsInSlot(day, day.AddDays(1)));
Is this better?
Similar to the
MonthSelect
on the various Year Views, this will raise aSelectDay
event on a click of the Day Header (Day and Week View) or the Day Number (Month View).Additional
Also in this PR, I had to change a line in the
OnKeyPress
event inDayView.razor
.This was taking the
CurrentDate
, which includes theStartTime
and setting the range toCurrentDate.AddDays(1)
. This resulted in (using defaultStartTime
value) from 08:00 one day to to 08:00 the next day. All other range calculations are based on actual start of day to end of day.