I would like to suggest a new View for the Scheduler: The Scheduler List View / Agenda View.
Unless the other views, it's not based on the usual calender-like view, but more like an "Agenda View". It would be a very good improvement and it's used in most common software products as well (e.g. Outlook).
Sources for inspiration
https://fullcalendar.io/demos - select list view on upper right
https://www.syncfusion.com/blazor-components/blazor-scheduler - search for "Agenda view"
https://docs.devexpress.com/WindowsForms/115961/controls-and-libraries/scheduler/views/agenda-view
https://docs.telerik.com/devtools/winforms/controls/scheduler/views/agenda-view
Is this available for blazor? if not could it be added somehow temporarily until support for it is added?
https://demos.telerik.com/aspnet-mvc/scheduler/yearview
The application users would like the scheduler to default to the work day view instead of the full day view.
Currently the only way to do this is to create a @ref to a property on my page and then override OnAfterRender to set the ShowWorkHours property to true. When examining the property I see that it is decorated with a HideFromApiRef attribute. Would it not be possible to change that to a Parameter so that the property could be set in the definition, or even bound to a variable?
Request either demo or functionality to either allow for "paging" of large scheduler data or functionality to utilize odata format for performance of scheduler data presentation.
My query even with just a year of data takes a few seconds to fetch from the database as well as several more seconds for the scheduler to process the data. Having functionality for changing views or switching days/weeks/months to allow for quick data updates from the back end would greatly improve overall performance.
A context menu event similar to the grid context menu would be useful for editing functions like cut/copy and paste.
---
ADMIN EDIT
You can use the item template to integrate context menus in the scheduler: https://github.com/telerik/blazor-ui/tree/master/scheduler/appointment-context-menu. This also allows you a lot of other customization options like adding tooltips and changing the appearance/information users see at first glance.
For a context menu on the slots - probably this item will expose a template for them so the same approach would apply.
---
Hi fellows,
I just wanted to know, if it's possible to use the timeline view in blazor as well (compared to asp.net core?).
And if so, how can I do it?
If not: are there any plans in the pipe for activating this feature?
Best regards
Pascal
Currently, you can only initiate editing/creating of an appointment in the Scheduler on double click. I'd like to be able to trigger these operations on single click.
It will be nice to have EditOn parameter to allow choosing if editing/creating will fire on single or double click of an appointment/slot.
Currently, when using an ItemTemplate, I cannot get the details for the current occurrence from the template context as it cannot be differentiated from the series.
===
TELERIK EDIT:
In the meantime, it is possible to get the occurrence details with JavaScript. The occurrence start and end DateTime are rendered as an aria-label HTML attribute of the <div class="k-event"> element.
@inject IJSRuntime js
<TelerikScheduler Data="@SchedulerData"
@bind-Date="@SelectedDate"
Height="600px">
<SchedulerViews>
<SchedulerMultiDayView StartTime="@StartTime" />
</SchedulerViews>
<ItemTemplate>
<div onclick="getOccurrenceDateTime(event)" style="height:100%">
@{ var appointment = (Appointment)context; }
@appointment.Title (CLICK ME)
</div>
</ItemTemplate>
</TelerikScheduler>
@* Move JavaScript code to a separate JS file *@
<script suppress-error="BL9992">
function getOccurrenceDateTime(e) {
alert(e.target.closest("div.k-event").getAttribute("aria-label"));
}
</script>
@code {
private AppointmentService appointmentService = new();
private DateTime SelectedDate { get; set; } = DateTime.Now.Date;
private DateTime StartTime { get; set; } = DateTime.Now.Date.AddHours(7);
private List<Appointment> SchedulerData = new List<Appointment>();
protected override async Task OnInitializedAsync()
{
SchedulerData = await appointmentService.GetAppointmentsAsync();
}
public class AppointmentService
{
public async Task<List<Appointment>> GetAppointmentsAsync()
{
await Task.Delay(1);
return GetAppointments();
}
public List<Appointment> GetAppointments()
{
List<Appointment> data = new List<Appointment>();
DateTime baselineTime = GetStartTime();
data.Add(new Appointment
{
Title = "Daily Meeting",
Description = "Daily Meeting",
Start = baselineTime.AddHours(1),
End = baselineTime.AddHours(1).AddMinutes(30),
RecurrenceRule = "FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR"
});
return data;
}
public DateTime GetStartTime()
{
DateTime dt = DateTime.Now;
int daysSinceMonday = dt.DayOfWeek - DayOfWeek.Monday;
return new DateTime(dt.Year, dt.Month, dt.Day - daysSinceMonday, 8, 0, 0);
}
}
public class Appointment
{
public Guid Id { get; set; }
public string Title { get; set; } = string.Empty;
public DateTime Start { get; set; }
public DateTime End { get; set; }
public bool IsAllDay { get; set; }
public string Description { get; set; } = string.Empty;
public string RecurrenceRule { get; set; } = string.Empty;
public Appointment()
{
var rand = new Random();
Id = Guid.NewGuid();
}
}
}
I'd like to be able to search and filter the appointments in the Scheduler. Please add support for Searchbox in the Scheduler Toolbar as in the Telerik UI for ASP.NET Core.
I want to change what is shown in the scheduler headers, depending on my current culture, and on the view (different things for a week view and for a day view, for example).
The following date in the Scheduler RecurrenceRule cannot be parsed and is ignored:
RecurrenceRule = "FREQ=DAILY;UNTIL=20210722T000000"
According to the RFC5545 specification, this should be a valid date format.
These formats will work:
RecurrenceRule = "FREQ=DAILY;UNTIL=2021-07-22T00:00:00"
RecurrenceRule = "FREQ=DAILY;UNTIL=2021-07-22T00:00:00.000Z"
EDIT:
This is my work-around. It captures the date portion of the UNTIL clause, converts it into the date string style that Telerik can understand, then reassembles the rule stringprivate string TransformRecurrenceRule()
{
const string untilSeparator = "UNTIL=";
var ruleParts = RecurrenceRule.Split(untilSeparator, StringSplitOptions.RemoveEmptyEntries);
if (ruleParts.Length <= 1)
{
// There was no Until clause to worry about
return RecurrenceRule;
}
// Save the first part of the rule
var ruleBeginning = ruleParts[0];
// Split the date part of the until clause from any following clauses
var remainingClauses = ruleParts[1].Split(';', 2, StringSplitOptions.RemoveEmptyEntries);
//Save the date part of the until clause
var untilDate = remainingClauses[0];
// Save any following clauses with the `;` replaced
var ruleEnding = "";
if (remainingClauses.Length == 2)
{
ruleEnding = $";{remainingClauses[1]}";
}
// Convert the until date into .net parsable format
const string format = "yyyyMMddTHHmmss";
var date = DateTime.ParseExact(untilDate, format, CultureInfo.InvariantCulture);
var dateStr = date.ToString("yyyy-MM-ddTHH:mm:ss");
// recombine rule components
var newRuleParts = new[] {ruleBeginning, untilSeparator, dateStr, ruleEnding};
var newRule = string.Join("",newRuleParts);
return newRule;
}
Is it possible to do group scheduling similar to what is done https://demos.telerik.com/aspnet-mvc/scheduler/resources-grouping-horizontal.
If not how do i include kendo in a serverside blazor application?
Cheers
Ian
That's pretty weird but nevertheless very specific: if the Scheduler is loaded with POCO objects from EntityFramework with LazyLoading enabled (Castle.Proxies objects) them the k-event-drag-hint box is not shown (!)
It took me some time to figure it out...
is it possible to drag between hours to create a new appointment like in the attached recording?
I don't want to allow reoccurring appointments. Is there a way to hide the reoccurring part of the editor so they can't create one? I think a simple way to shut off reoccurring appointments on the entire scheduler would be great.
---
ADMIN EDIT
At the moment, a custom edit form is the only option: https://github.com/telerik/blazor-ui/tree/master/scheduler/custom-edit-form
---