Questions Tagged javascript
Delete??
Answered: There are several options, please see the following documentation page: https://doc.daypilot.org/scheduler/event-deleting/
How to export excel with table
Answered: You are exporting the data in CSV (https://en.wikipedia.org/wiki/Comma-separated_values) format which doesn't support any formatting. Basically, there are two options: 1. You'll need to use a third-p...
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....
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...
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...
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...
Daypilot trial expires at one day
Answered: There is no built-in expiration mechanism that would cripple displaying the data. It looks like there might be a problem/bug. I assume you are using the sample project from https://code.daypilot.org/...
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...
Including the scheduler daypilot into a directive with isolated scope
Answered: Since version 8.2 (http://javascript.daypilot.org/daypilot-pro-for-javascript-8-2/) the scheduler supports "publish-as" attribute which lets you specify the target for the DayPilot.Scheduler object. ...
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 current position details in Calendar (real time)
Answered: Unfortunately this is not supported in the Calendar control at the moment.
Limit resources
Answered: DayPilot Scheduler doesn't limit the number of resources. However, there are different heigh settings that will affect how many resources/rows are visible without scrolling. Please take a look at the...
Hide rows in Gantt
Answered: The row filtering API is not implemented in the Gantt chart at the moment. However, you can hide the row by setting .row.hidden attribute of the task to true:
var task = dp.tasks.list[0[;
if (!tas...
How to detect when I scroll to the bottom
I see we have method dps.getScrollY() but if I want to detect when we scroll the scroll bar to the bottom, I don't know how to do this? Thanks
scroll vertically on touch device
Answered: The latest sandbox build (8.2.2185) now supports vertical touch scrolling using the row headers: http://javascript.daypilot.org/sandbox/ Let me know if it doesn't work as expected.
Can be added in a different granularity than displayed.
E.g. calendar renders 30 minutes slots. But click, drag and unclick paints and adds in 15 minutes granularity. I try to use cellDuration = 15 can move and resize in 15 minutes but I don’t want border...
Border is gone when zoom page.
Answered: Unfortunately there is no way to control how the browsers will scale the page when using a zoom level other than 100%. However, you can try increasing the cell border width using custom CSS theme. Se...
Edit
Answered: You mus use the EventClickHandling and EventClickJavascript to envoke a ModalDialog, an show the editable data on it. https://doc.daypilot.org/scheduler/event-editing/
How to disable rowheadercolumn resizing?
It's possible to resize the width of a rowheadercolumn in scheduler by simply moving the columnheader splitter left or right. How can I disable this? I tried the following things without success: row...
Multiple resources timerangeselect
Answered: Yes, it's possible but you need to select the resources one by one (holding Ctrl): http://javascript.daypilot.org/demo/scheduler/multirange.html
SQLite
Answered: Most likely the problem is that the process doesn't have permissions to write to daypilot.sqlite. 1. Trying adding the permissions. 2. Placing the DB file in a publicly accessible location is not a g...
Event moving between schedulers
Answered: Thanks for reporting the issue. It should be fixed now in the latest sandbox build (8.2.2143): http://javascript.daypilot.org/sandbox/scheduler/eventmovingtwoschedulers.html
Scheduler styling: small vertical open space between rightmost column and right border
The right side of the scheduler looks like this: http://imgur.com/D7Ngfvy Is it possible to just hide the outer border, or is there another solution to this? I'm using angular daypilot and I created ...
Using DayPilot.Scheduler.options.update(), all events disappear
Answered: There are two ways to update events:
dp.events.list = [ ... ];
dp.update();
Since build 1749 it's also possible to replace it with a single call:
dp.update({ events: [ ... ]});
Note that in ...
How to change weekly calender
Answered: You can change the visible week using startDate property:
<select id="week">
<option value="2016-04-04">Week 14</option>
<option value="2016-04-11">Week 15</option>
</select>
<div id="dp"...
Directive not working
Answered: If you don't see anything in the JavaScript console I recommend starting with the following minimum code:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Angular...