コード例 #1
0
        void OnAppointmentRender(SchedulerAppointmentRenderEventArgs <Appointment> args)
        {
            // Never call StateHasChanged in AppointmentRender - would lead to infinite loop

            if (args.Data.Text == "Birthday")
            {
                args.Attributes["style"] = "background: red";
            }
        }
コード例 #2
0
        /// <inheritdoc />
        public IDictionary <string, object> GetAppointmentAttributes(AppointmentData item)
        {
            var args = new SchedulerAppointmentRenderEventArgs <TItem> {
                Data = (TItem)item.Data, Start = item.Start, End = item.End
            };

            AppointmentRender?.Invoke(args);

            return(args.Attributes);
        }