Questions Tagged how-to
Is it possible to display a Daypilot modal dialog form from the code behind of a web form?
Answered: The only way to open the modal dialog from the server side is to run the required js code using RegisterStartupScript() method. This technique is used by the Util.Modal class that comes with the moda...
Hiding resources with no events
Answered: load only resource which has events from loadResources Method.
Force loading message with backdrop
Answered: dp.message() should work anytime and it doesn't depend on any other variable: https://api.daypilot.org/daypilot-scheduler-message/ You can also use dp.message.hide() to hide the current message. Ther...
DayPilot Inline Event Editing
Answered: The texbox dimensions are set according to the original event already. However, there is a certain minimum width/height enforced by the browser so you may see a bigger textbox for some small events. ...
Different Height for specific Events?
Answered: Yes, you can specify custom height using .height property: https://api.daypilot.org/daypilot-event-data/ It will overrride the global height set using .eventHeight property. You can also specify cust...
Programmatically disable/enable the controls on the recurrenteventedit.aspx page? Is it possible? if so, how..
Hi Dan and Team, I would like to programmatically change those controls on the RecurrentEventEdit.aspx page.. So they can be edited, disabled, enabled, etc... Is this possible and if so, please advis...
Ressource Tree Collapse JavaScript
Answered: Since build 2259, you can use DayPilot.Row.collapse() and DayPilot.Row.expand(): https://api.daypilot.org/daypilot-row-collapse/ https://api.daypilot.org/daypilot-row-expand/ In previous builds, you ...
How to scroll with mouse click and not with the mouse wheel SCHEDULER
Answered: You can scroll the grid using a "swipe" touch gesture. On touch devices, the time range selecting mode requires a "tap-and-hold" gesture to become activated. Before the selection is activated you can...
How to change transition in daypilot scheduler
Answered: You can scroll to the specified date using .scrollTo() method: https://api.daypilot.org/daypilot-scheduler-scrollto/ Demo: http://javascript.daypilot.org/demo/scheduler/scrolling.html Let me know if ...
Scheduler Event Resizing, notifying user of the overlap and then undoing the resize?
Answered: In the ASP.NET version you can do it like this: 1. Set EventResizeHandling to "CallBack". 2. In the OnEventResize handler, perform your checks. If there is an overlap, use UpdateType.None and notify ...
Change start time and end time of a day in DayPilot.Scheduler
Answered: You can customize the start and end hour by generating a custom timeline: https://doc.daypilot.org/scheduler/timeline/
Delete??
Answered: There are several options, please see the following documentation page: https://doc.daypilot.org/scheduler/event-deleting/
How to get days (dp.days) according to start date and end date from user selected
Answered: You can use DayPilot.DateUtil.daysDiff() helper method:
DayPilot.DateUtil.daysDiff("2016-06-09", "2016-06-10");
The arguments can be passed as strings (they will be parsed using DayPilot.Date con...
Preventing right button of the mouse from selecting a TimeRange
Answered: The following config disables selecting a time range using right mouse button:
dp.timeRangeRightClickHandling = "Disabled";
dp.onGridMouseDown = function(args) {
var button = DayPilot.Util.mo...
Testing the status of a room while selecting a timerange
Answered: If you store the resource status in dp.resource[].tags object you will be able to access it like this:
dp.resources = [
{ name: "Resource 1", id: 1, tags : {disabled: true } }
];
// ...
dp....
Timeline Queries
Answered: The output under the "DayPilot MVC" section in your sample image is what I would expect to see. This is how it is designed to work - the second time header row displays days and it starts and ends at...
Issue with loading events data from array.
Answered: You need to change "dp.events" to "dp.events.list":
dp.events.list = [{text: "Busy", start: "2013-03-24T03:00:00", end: "2013-03-24T05:00:00", id: 10, resource: "B"}];
See also: https://doc.daypi...
Display Loading Icon when Event Moving in DayPilotScheduler
In my ASP.NET MVC application, I am using a DayPilotScheduler. If anyone is trying to move the event, then it has to display a loading symbol. So what I have done is, In my HTML code, I have added, E...
How to Load only a Single DayPilotScheduler
Sir, In my ASP.NET MVC application, I have added a tab control with 2 tab items in a view. Both the tab items contains 2 different daypilotscheduler objects. The problem is, when I start my applicati...
Set Scheduler width with javascript in View
Answered: You might want to check the "Auto Cell Width" feature which adjusts the cell width to fill the available space (there will be no horizontal scrollbar): https://doc.daypilot.org/scheduler/auto-cell-wi...
Horizontal resources
Answered: It's possible to display resources on the horizontal axis with the Calendar control switched to "Resources" mode: https://doc.daypilot.org/calendar/resources-view/ Demo: http://javascript.daypilot.or...
Change Scheduler displayed Date format
Answered: The MVC Hotel Reservation tutorial at https://code.daypilot.org/32389/asp-net-mvc-hotel-room-booking uses the following code to format the start and end date: ReservationController.cs:
public A...
Multiple row selection on touch devices
Answered: Sorry for the delay - a couple of changes were necessary so it took a bit longer. Instead of using the default behavior which is defined using .rowClickHandling="Select" you can also add your own eve...
Coloring cells to indicate "today"
Answered: In the Scheduler, you can use the following code:
dp.onBeforeCellRender = function(args) {
if (args.cell.start <= DayPilot.Date.today() && DayPilot.Date.today() < args.cell.end) {
args.ce...
Customise Cell Duration Label
Answered: You can customize the time headers using OnBeforeTimeHeaderRender: http://doc.daypilot.org/scheduler/time-header-customization/ The sample code would look like this:
protected override void OnBefor...
TimeHeader customization hidden after scrolling
Answered: By default, the Scheduler displays a special overlay div over long time header cells during scrolling: http://doc.daypilot.org/scheduler/floating-time-headers/ It should copy the custom time header H...
Missing Typescript Definition scheme for DayPilot
Answered: Unfortunately it's not available at the moment but it's in the queue.
Add beds
Answered: At this moment the number of beds is not editable using the sample code. However, it's stored in the database (rooms.capacity field) so it shouldn't be difficult to add an option to edit it.
Display Tooltip
Answered: This solutions works w/ the API. this._drawEvent = function(e) { ... var inner = document.createElement("div"); inner.setAttribute("unselectable", "on"); inner.className = calendar._prefixCssClass("_...
Context Menu Not Being Displayed
Answered: I've tried to reproduce the problem using the following testing Web Form but it seems to work fine: CalendarContextMenu.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CalendarContextM...