DayPilot Pro 6.4

Release date: March 17, 2011 (build 2245)

(F) Rounded Corners for DayPilot Month

month rounded corners

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.

(F) Rounded Corners for DayPilot Scheduler

scheduler rounded corners

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".

(F) Rounded Corners for DayPilot Bubble

bubble rounded corners

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.

(F) Weeks View for DayPilot Month

month weeks view

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;
    }

(F) RecurrenceExpander

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)

Example

Source DataTable

recurrence expander source

Expand Call

DataTable output = RecurrenceExpander.Expand(source, "recurrence", "start", "end", "id", 
  "master", DayPilotCalendar1.StartDate, DayPilotCalendar1.EndDate);

Output DataTable

recurrence expander output 700

Bug fixes and minor improvements

Common

  • Improvement: The source code project now uses Visual Studio 2008 format. It used to be a Visual Studio 2005 project. The assembly is still compiled for .NET Framework 2.0 (no change here).
  • Improvement: All missing semicolons fixed in JavaScript files. Now they can be compressed with other JavaScript compression tools as well (see also How to compile DayPilot Pro source).
  • Bug: Tag serialization switched to JSON (no more problems with '+' sign in one of the tag fields).

Calendar

  • Bug: Certain all-day events were excluded for AllDayEnd="Date".
  • Bug: ViewTypeParser was not recognizing "Day" value.
  • Bug: All-day events were not rendered properly during image export.

Month