DayPilot Pro 6.1

Release date: 22 September 2010 (build 2116)

(F) New Context Menu

Old Menu

calendar context menu old

New Menu

calendar context menu new hover

Features

  • Full CSS styling
  • More attractive default theme

API changes

The following properties are no longer supported:

  • MenuBorderColor
  • MenuBackColor
  • MenuTitle (the menu title is not available anymore)
  • MenuTitleBackColor (the menu title is not available anymore)
  • MenuFontSize
  • MenuFontFamily
  • MenuItemColor
  • ShowMenuTitle (the menu title is not available anymore)

These properties are marked with Obsolete attribute and their value is ignored.

You can use CSS classes to style the menu.

See also

(F) Integrated Message Bar (DayPilot Scheduler)

scheduler message bar

DayPilot Scheduler now supports an integrated message bar (already available in DayPilot Calendar).

See also

(F) Integrated Message Bar (DayPilot Month)

month message bar

DayPilot Month now supports an integrated message bar (already available in DayPilot Calendar).

See also

(F) Easy Message Bar Notification (Calendar, Month, Scheduler)

calendar message bar

The message bar now can be updated easily using a single line of code and without any JavaScript on the client side.

You can use a new UpdateWithMessage() method:

  • UpdateWithMessage(string message)

Examples

The old way to show a message (still supported):

Default.aspx

<script type="text/javascript">
function afterRender(data) {
    if (data) {
        dpc1.message(data);
    }
}
</script>

<daypilot:daypilotcalendar 
  id="DayPilotCalendar1" 
  runat="server" 
  ...
  AfterRenderJavaScript="afterRender(data);" 
  ...
/>

Default.aspx.cs

    protected void DayPilotCalendar1_EventResize(object sender, EventResizeEventArgs e)
    {
        // ...
        DayPilotCalendar1.Update("Event resized");
    }

The new way to show a message:

Default.aspx.cs

    protected void DayPilotCalendar1_EventResize(object sender, EventResizeEventArgs e)
    {
        // ...
        DayPilotCalendar1.UpdateWithMessage("Event resized");
    }

See also

(F) Message Bar Close Button (Calendar, Month, Scheduler)

message bar close

The Message Bar invoked using UpdateWithMessage() method is visible for 20 seconds.

  • If there is a new message during that time, the message bar fades out and in to give a visual feedback.
  • It can be closed using an "X" button on its right side.

See also

(F) New ViewType Modes (DayPilot Calendar)

calendar viewtype

The ViewType property now supports three new modes:

  • Day
  • WorkWeek
  • Week

These modes simplify work with the standard views.

  • It automatically sets the Day property value.
  • It automatically sets the StartDate to the first day of week in WorkWeek and Week modes (using the current culture).

Examples

The old way to show a week (still supported):

Default.aspx

...
ViewType="Days"
Days="7"
...

Default.aspx.cs

    protected void Page_Load(object sender, EventArgs e)
    {
        // ...
        if (!IsPostBack)
        {
            // ...
            DayPilotCalendar1.StartDate = DayPilot.Utils.Week.FirstDayOfWeek();
            DataBind();
        }
    }

The new way to show a week:

Default.aspx

...
ViewType="Week"
...

See also

(F) Intelligent Update()

calendar update

It is no longer necessary to specify the CallBackUpdateType parameter. All controls now detect the changes and the update mode is selected automatically.

  • This change will not save much typing but it avoids problems with selecting the wrong update type (especially not requesting Full update when it is necessary).
  • It is still possible to specify the CallBackUpdateType and force the update mode. The existing code will work as before.

The old way to request a client-side update (still supported)

    protected void DayPilotCalendar1_Command(object sender, CommandEventArgs e)
    {
        switch (e.Command)
        {
            case "navigate":
                DateTime start = (DateTime) e.Data["start"];
                DateTime end = (DateTime) e.Data["end"];

                DayPilotCalendar1.StartDate = start;
                DayPilotCalendar1.DataBind();
                DayPilotCalendar1.Update(CallBackUpdateType.Full);
                break;
        }
    }

The new way to request a client-side update

    protected void DayPilotCalendar1_Command(object sender, CommandEventArgs e)
    {
        switch (e.Command)
        {
            case "navigate":
                DateTime start = (DateTime) e.Data["start"];
                DateTime end = (DateTime) e.Data["end"];

                DayPilotCalendar1.StartDate = start;
                DayPilotCalendar1.DataBind();
                DayPilotCalendar1.Update();
                break;
        }
    }

(F) Movable Modal Popup (Modal.js)

scheduler modal

The modal popup which is used for event detail editing is now improved.

  • The modal popup can be moved using drag&drop (using the gray border).
  • It scrolls automatically when you scroll the web page to stay visible.
  • The dark background is resized automatically to match the new window size (when resizing the browser window).

The drag&drop is enabled by default. You can turn it off by specifying:

modal.dragDrop = false;

(F) ContextMenu as an Option for EventClickHandling (Calendar, Month, Scheduler)

scheduler eventclick menu

It is now possible to activate the context menu on left mouse click (on events).

You can do this using EventClickHandling property:

EventClickHandling="ContextMenu"

The menu specified in ContextMenuID or in e.ContextMenuClientName in BeforeEventRender event handler will be used.

Bug Fixes and Minor Improvements

DayPilot Calendar

  • Bug: Zero length events (Start == End) are properly rendered in a box now.
  • Bug: Time cell columns were not aligned with the column headers in IE7 and in IE8 running in compatibility mode.