Protected Sub DayPilotCalendar1_BeforeEventRender(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.Calendar.BeforeEventRenderEventArgs)
Dim color As String = CStr(e.DataItem("AssignmentColor"))
If Not String.IsNullOrEmpty(color) Then
e.BackgroundColor = color
e.BorderColor = color
e.FontColor = "#ffffff"
End If
If e.Recurrent Then
If e.RecurrentException Then
e.Areas.Add((New Area()).Right(5).Top(5).Width(14).Height(14).Visibility(AreaVisibility.Visible).CssClass("area_recurring_ex"))
Else
e.Areas.Add((New Area()).Right(5).Top(5).Width(14).Height(14).Visibility(AreaVisibility.Visible).CssClass("area_recurring"))
End If
End If
End Sub

Timetable CSS Theme

The timetable_simple CSS theme was created using the online CSS theme designer. It uses the default colors and styles similar to the built-in CSS theme (calendar_default).

The DataManger.CreateAssignment() method uses RecurrenceRule.FromJson() to parse the rule and RecurrenceRule.Encode() converts it to the string that will be stored in the database (AssignmentRecurrence field).