Release date: April 19, 2010
(F) Integrated message bar (Calendar)
DayPilot Calendar is now able to show event messages using an animated message bar.
Silver Theme Example
Google Theme Example
This is the original JavaScript for showing client-side messages:
function afterRender(data) {
if (data) {
if (data.message) {
showMessage(data.message + " (id " + data.id + ")");
}
else {
showMessage(data);
}
}
}
/* message helpers */
var timeout = null;
function showMessage(text) {
var messageDiv = document.getElementById("message");
messageDiv.innerHTML = text;
messageDiv.style.display = '';
if (timeout) {
window.clearTimeout(timeout);
}
timeout = window.setTimeout('clearMessage()', 4000);
}
function clearMessage() {
var messageDiv = document.getElementById("message");
messageDiv.innerHTML = '';
messageDiv.style.display = 'none';
}
Now you can use much shorter code:
function afterRender(data) {
if (data) {
var text = data.message ? (data.message + " (id " + data.id + ")") : data;
dpc1.message(text, 1000, "#ffffff", "#dc143c");
}
}
You can call .message() method of the DayPilotCalendar object with the following parameters:
DayPilotCalendar.message(html, delay, foreColor, backColor)
Parameters:
- html - the HTML code to be shown
- delay - message visibility delay in ms (default value: 2000)
- foreColor - foreground color code (default value: "#ffffff")
- backColor - background color code (default value: "#000000")
(F) CallBack Shortcut Property (Calendar, Scheduler, Month)
DayPilot 5.9 will give you hints on what properties can be changed during full CallBack Update. The IntelliSense suggestions for CallBack property will show you the list of updateable properties.
The following code:
DayPilotCalendar1.StartDate = DateTime.Today;
DayPilotCalendar1.Update(CallBackUpdateType.Full);
Can be replaced with the following code:
DayPilotCalendar1.CallBack.StartDate = DateTime.Today;
DayPilotCalendar1.Update(CallBackUpdateType.Full);
DayPilot Calendar
- DayPilotCalendar.CallBack.CellDuration
- DayPilotCalendar.CallBack.Days
- DayPilotCalendar.CallBack.StartDate
- DayPilotCalendar.CallBack.ViewType
DayPilot Month
- DayPilotMonth.CallBack.StartDate
DayPilot Scheduler
- DayPilotScheduler.CallBack.CellDuration
- DayPilotScheduler.CallBack.CellGroupBy
- DayPilotScheduler.CallBack.CellWidth
- DayPilotScheduler.CallBack.Days
- DayPilotScheduler.CallBack.Resources
- DayPilotScheduler.CallBack.Separators
- DayPilotScheduler.CallBack.StartDate
(F) TimeRangeDoubleClick (Month)
Support for double-clicking the time cells.
(F) Control and Shift Key Indicators (Calendar, Scheduler)
EventMove event stores the Ctrl and Shift key status. This allows implementation of drag&drop copy/move operations.
Bug Fixes and Minor Improvements
DayPilot Calendar
- Bug (F-913): All-day events were broken in Resources view.
- Bug: Allday events were not rendering properly in Resources view, HeaderLevels > 1.
- Bug: Custom settings of DurationBarImageUrl in BeforeEventRender were ignored.
- Bug: IE7 compatibility mode header distortion fixed.
- Bug: AM/PM is now printed correctly in overnight shifts (DayBeginsHour > 0).
- Bug: Events are not cut at 24:00 in Resources view in overnight shifts (DayBeginsHour > 0).
- Bug: The first visible day now correctly shows all-day events for AllDayEnd="Date".
- Bug: Header columns were not correctly aligned with content columns in some cases.
- Improvement: Moving/resizing shadow speed improved in IE8.
- Improvement: e.row() method changed to e.resource() in the JavaScript event handlers.
- Improvement: ViewType property change allowed during Full Update.
DayPilot Month
- Bug: VisibleEnd value was not correctly calculated in some cases (May 2009, WeekStarts="Monday", hidden weekends)
- Bug: Height was not properly updated during Full Update.
- Bug: EventMoveHandling="Disabled" now correctly disables the moving shadow.
DayPilot Scheduler
- Bug (F-978, F-984): Last day of the exported image didn't show any events.
- Bug: CellGroupBy="Year" was crashing Visual Studio in Design View.
- Bug: Incorrect week duration of 10800 was fixed (demo, time header format detection). See also http://kb.daypilot.org/42890/what-is-the-duration-of-one-week-in-minutes/.
- Bug: "JSONData must be initialized first" error fixed (it was appearing when the Resources collection was empty and a CallBack was invoked).
- Bug: EndDate now returns the correct value of StartDate.AddDays(Days) - the last visible time point.
DayPilot Menu
- Improvement: MenuFontFamily property added.
Other Changes
- DayPilotMobile control removed.