Questions Tagged how-to
How to set a special color for actual date in Gantt?
Answered: There are two options: 1. You can add a separator:
DayPilotGantt1.Separators.Add(DateTime.Today, Color.Red);
2. You can change the background color of the cells:
protected void DayPilotGantt1_B...
I am trying to delete a series of events using recurrence rule.. Is there a sample implementation available?
Answered: You can read the ID of the master event (that one that defines the series) using e.RecurrentMasterId. If you don't define any exception from the rule just delete the record with this ID.
protec...
ShiftScheduling tutorial
Answered: It works like this: 1. When you use EventClickHandling="JavaScript" the Scheduler will fire the JavaScript code specified using EventClikJavaScript property. 2. It will pass "e" object to the JavaScr...
Event Bubble
I am trying to have event bubble in day pilot scheduler. Which has a content of title, description and a image thumbnail. But the positioning is not happening correctly when i have this on the contro...
how to remove the new event if inline event edit text is blank
Answered: In the latest build (8.1.1914), the onEventEdit/onEventEdited events are now also fired when the editing was canceled using <esc> or when the text is unchanged. The canceled editing is indicated usin...
Open DayPilot for specific date + event and set focus - Example?
Answered: You can use .scrollTo(date, animation, target) method to scroll to a specific date: http://api.daypilot.org/daypilot-scheduler-scrollto/ You can use .scrollToResource() method to scroll vertically to...
How To Redirect To URL By Clicking Event
Answered: Use the following config:
@(Html.DayPilotCalendar("dpc", new DayPilotCalendarConfig {
// ...
EventClickHandling = EventClickHandlingType.JavaScript,
EventClickJavaScript = "window.locatio...
Use Custom JSON Object in resource
Answered: The scheduler .resources property requires this exact structure. See also: http://api.daypilot.org/daypilot-scheduler-resources/ If your server returns JSON array that has items with a different stru...
Target cell based on event type?
Answered: You can use onBeforeCellRender event like this:
//...
dp.onBeforeCellRender = function(args) {
var events = dp.events.forRange(args.cell.start, args.cell.end);
// check events array for ev...
All day events on month view
Answered: The month view (DayPilot.Month class) doesn't recognize all-day events because they are displayed the same way as normal events. Unlike the Calendar which displays them in a special row below the day...
how to use modal.js to open a add event dialog in daypilot scheduler lite
Answered: Some of the DayPilotScheduler properties you are using are only available in the Pro version: Scale CellGroupBy ClientObjectName DataTagFields OnCommand Also, the TimeRangeSelectedJavaScript is resol...
Add multiple rows to selection is slow, any faster way?
Answered: You can also use .selectedRows property:
dp.selectedRows = ['A', 'B', 'C'];
dp.update();
Let me know if the performance doesn't get better this way.
DayPilotBubble's CSS is not accepting at run time
Answered: This happens because the bubble object is initialized in Load phase. It's now updated in the the latest build (8.1.3472). You can download it in the sandbox: http://www.daypilot.org/sandbox/ Let me k...
Navigator onTimeRangeSelected with Switcher
Answered: I've solved using onTimeRangeSelect insted of onTimeRangeSelected. Bye
Getting tag URL Parameter from JSON Request
Answered: There are two options: 1. You can send the url from the server:
class Event {}
class Tags {}
$events = array();
foreach($result as $row) {
$e = new Event();
$e->id = $row['plan_id'];
...
Change cell border color in scheduler?
Answered: The direct style properties are ignored in the CssOnly mode (the CssOnly mode is forced since 8.0 release): http://api.daypilot.org/daypilot-scheduler-cssonly/ You can control the cell border using C...
Navigator looks weird
Hi, This is how the navigator looks: http://i.imgur.com/lK6Pdft.png code: http://pastebin.com/rHqzC1zn As you can see the bottom line is to short and the right line doesn't show at all. How can I fix...
Is there an event/hook that tells me when onBeforeHeaderRender(s) are done?
Answered: Since build 8.1.1903, the onAfterRender event is fired during update as well. You can download the latest build in the sandbox: http://javascript.daypilot.org/sandbox/ The args.isUpdate parameter wil...
Scheduler Drag and Drop
Answered: I have replaced this line: var top = (event.part && event.part.top) ? (event.part.top + calendar.rows[event.part.dayIndex].Top) : coords.top; by this line: var top = (event.part && event.part.top && ...
Display Scheduler for specified Start and End date
Answered: At this moment the scheduler only works with .startDate and .days properties. You can use DayPilot.DateUtil.daysDiff(first, second) helper method to calculate the .days property:
var days = DayPilo...
Resize column widths on the fly
Answered: I've created a simple demo that uses your approach (<input type="range">): http://javascript.daypilot.org/sandbox/scheduler/cellwidth.html Implementation:
<div class="note">Cell Width: <input type=...
Refresh Daypilot not working correctly
Answered: I believe removing AutoPostBack="true" will fix your problem. If you have both AutoPostBack="true" and OnCheckedChanged="CBAct_CheckedChanged" set the following happens on the checkbox change: 1. The...
How to show Navigator in Horizontal Orientation
Hello, I am using Javascript to create Navigator. In this file I want to display 12 months Navigator in a page with 4 months in 3 rows. Can anyone please let me know how can I do it in lite version o...
Monthly Calendar Monthname title with Navigator
Answered: The problem is that you are manually calling onTimeRangeSelected without any parameter. Take a look at the source of this page: http://javascript.daypilot.org/demo/month/navigator.html This is the be...
Background Color for a Particular Event.
Answered: You would be better off switching to the JavaScript version of DayPilot Lite. As this is a pure client-side solution (without the server bindings) it takes just one place to change the behavior. The ...
How to modify source code to set event color in lite version
Answered: Guidance on how to modify the Lite source code to add specific features is beyond the scope of the support that we provide for the open-source version. If you want to save time inspecting and modifyi...
Gantt not rendering when deployed to IIS
Answered: There is no limitation built into the demo that would prevent deploying it on IIS. The rendered code (ASP.NET WebForms) should have three parts: 1. The empty div with id set to the ID of the control....
DayPilot Month Calendar
Answered: If you are using the DayPilot modal dialog: 1. You need to secure the "edit" page itself - this is required because DayPilot settings can be circumvented (they are client-side only). 2. Depending on ...
DayPilot Month Calendar
Answered: If the modal gets hidden by another part of the page (that uses position:relative or position:absolute) you can increase the z-index value using .zIndex property of the DayPilot.Modal object. See als...