Release date: March 17, 2011 (build 2245)
Rounded corners can be enabled using EventCorners property:
EventCorners="Rounded"
The default value is "Regular".
Note: Rounded corners don't work in IE 6-8. They work fine in Firefox, Safari, Chrome, and IE 9.
Rounded corners can be enabled using EventCorners property:
EventCorners="Rounded"
The default value is "Regular".
Note: Rounded corners don't work in IE 6-8. They work fine in Firefox, Safari, Chrome, and IE 9.
Also, the rounded corners don't work very well with the duration bar, so it's recommended to set DurationBarVisible="false".
Rounded corners can be enabled using Corners property:
Corners="Rounded"
Default value is "Regular".
Note: Rounded corners don't work in IE 6-8. They work fine in Firefox, Safari, Chrome, and IE 9.
In addition to the current default mode (ViewType="Month") that automatically shows a full month (with the number of weeks adjusted automatically as needed) there is now a new weeks view mode (ViewType="Weeks").
It allows to specify the first week (using StartDate property) and the number of weeks to be displayed (Weeks property).
This example uses the Weeks mode to show the selected week plus one previous and one following week:
http://www.daypilot.org/sandbox/Month/WeeksView.aspx
ASPX
<DayPilot:DayPilotNavigator ID="DayPilotNavigator1" runat="server" BoundDayPilotID="DayPilotMonth1" SelectMode="Week" ... ></DayPilot:DayPilotNavigator> <DayPilot:DayPilotMonth ID="DayPilotMonth1" runat="server" ... ViewType="Weeks" Weeks="3" OnBeforeCellRender="DayPilotMonth1_BeforeCellRender" />
C#
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DayPilotMonth1.StartDate = DateTime.Today.AddDays(-7); // ... } } protected void DayPilotMonth1_Command(object sender, CommandEventArgs e) { switch (e.Command) { case "navigate": // display previous and following week as well DateTime start = (DateTime) e.Data["start"]; DateTime previous = start.AddDays(-7); DayPilotMonth1.StartDate = previous; // ... break; } } protected void DayPilotMonth1_BeforeCellRender(object sender, DayPilot.Web.Ui.Events.Month.BeforeCellRenderEventArgs e) { // use lighter colors for the other than selected weeks if (!isThisWeek(e.Start)) { e.BackgroundColor = isWeekend(e.Start) ? "#fff8d1" : "#ffffe9"; } } private bool isThisWeek(DateTime d) { DateTime first = Week.FirstDayOfWeek(DayPilotMonth1.StartDate.AddDays(7), DayPilotMonth1.ResolvedWeekStart); DateTime last = first.AddDays(7); return first <= d && d < last; } private bool isWeekend(DateTime d) { return d.DayOfWeek == DayOfWeek.Sunday || d.DayOfWeek == DayOfWeek.Saturday; }
RecurrenceExpander.Expand static method allows recurrence events preprocessing. It takes a DataTable with source data and produces another DataTable with recurrent events expanded.
Declaration:
public static DataTable Expand(DataTable source, string recurrenceFieldName, string startFieldName, string endFieldName, string idFieldName, string recurrenceMasterIdFieldName, DateTime rangeStart, DateTime rangeEnd)
Source DataTable
Expand Call
DataTable output = RecurrenceExpander.Expand(source, "recurrence", "start", "end", "id", "master", DayPilotCalendar1.StartDate, DayPilotCalendar1.EndDate);
Output DataTable
Common