Questions Tagged javascript
Calendar stops working
Answered: Do you see any error in the JavaScript console? Does the whole page freeze (do other element on the page work) or is it just that the Calendar doesn't respond to mouse actions? I know that it might b...
options to split hour
Answered: For the Calendar component (used in index.php and doctor.php) you can adjust the scale to show 15-minute cells using cellDuration property:
var calendar= new DayPilot.Calendar("dp");
// ...
calen...
When collapse tree, it occurs unspecified error
Answered: This bug should be fixed now in the latest sandbox build (2018.2.3291): https://javascript.daypilot.org/sandbox/ Please let me know if the problem persists.
How to get all events by Resource
Answered: Ben, You can get a list of all events like this:
var events = dp.rows.find("A").events.all();
And delete them:
dp.rows.find("A").events.all().forEach(function(e) {
dp.events.remove(e);
})...
Reduce tree parent heights compared to children
Answered: The row height is derived from the event height (the total height is adjusted automatically to fit all events). You can specify custom event height for the parent rows using eventHeight property: htt...
Drag and select default (without holding shift key)
Answered: You can change the behavior using onGridMouseDown event handler: https://api.daypilot.org/daypilot-scheduler-ongridmousedown/ Example:
dp.onGridMouseDown = function(args) {
args.action = "Rectan...
Drag items off scheduler
Answered: At this moment, you can only drop the events on another Scheduler instance. There are two ways to approach this: 1. Use a context menu item (something like "Unschedule") to remove an event from the S...
Navigator Render error
Answered: hi thanks for your fix answer. JavaScript 2018.2.3281 and i use electron with Chromium 61.0.3163.100. thanks
Manual scale timeline with minutes
Answered: Henry, The time headers can use one of the group sizes defined here: https://doc.daypilot.org/scheduler/time-header-groups/ If you want to use a group size smaller than one hour you need to use group...
Daypilot Angular 2 : ERROR : DayPilot.Scheduler: The placeholder element not found: 'dp_1527237171484105172'.
Answered: The Scheduler requires that the component is actually rendered during initialization. It creates a placeholder with ID starting with "dp_" which needs to be present. It looks like the accordion doesn...
No themes other than defualt included with Angular package 2018.2.3281
Answered: The sample CSS themes (including scheduler_8) can be found in the zip package (both trial and full versions), in demo/themes directory. You can also download it directly using this link: https://java...
When create new event it shows wrong time
Answered: Dhiraj, How do you get the start/end dates of the selected range? The onTimeRangeSelect(ed) event handler returns DayPilot.Date object which uses the idealized time zone that the Calendar uses intern...
DayPilot Calendar Angular allowEventOverlap = false Not preventing Event Overlap
Answered: It looks like you are using an old version - the allowEventOverlap property is supported since 2018.1.3187 in the Calendar component: https://javascript.daypilot.org/daypilot-pro-for-javascript-2018-...
Changing the Daypilot instance
Answered: I found the solution myself, would be of help to others if ever come across this question. I simply used the dispose() method of the DayPilot, so when the event is triggered, I first got rid of the e...
Angular 6 error
Answered: Martin- Angular 6 requires DayPilot Pro version 2018.2.3281 or later: https://javascript.daypilot.org/daypilot-pro-for-javascript-2018-2-3281/ I'm not able to reproduce the error with that version. T...
Filtering
I believe I have found a bug with the filtering function. I have two different pages on my web site with two different occurences of the Daypilot scheduler, and the filtering is working nicely on of ...
Angular 6 issue
Answered: This looks like a bug of Angular CLI. There seems to be a problem with all dependencies that are not stored in the npmjs registry (such as tarball and git sources): https://github.com/angular/angular...
Window resize cell line miss mach with time cell.
Answered: I'm not able to reproduce the problem in any major browser (Chrome, Firefox, IE, Edge). You might be using a custom CSS theme that prevents proper scaling.
backend_delete
Answered: Please take a look at the documentation: https://doc.daypilot.org/calendar/event-deleting/ You need to use onEventDelete event handler to call backend_delete.php endpoint on the server side. You need...
Scheduler - Row header columns export issue
Answered: There was a bug which caused the width of the first column to be calculated incorrectly - that made the text invisible for args.horizontalAlignment = "center". It should be fixed now in the latest sa...
Identify whether Event is selected or not
Answered: Please see multiselect.isSelected() method: https://api.daypilot.org/daypilot-scheduler-multiselect-isselected/
Issue "TypeError: e.copy is not a function [Learn More] daypilot-all-pro.min.js"
Answered: The dp.events.update() method (https://api.daypilot.org/daypilot-scheduler-events-update/) requires a DayPilot.Event object (https://api.daypilot.org/daypilot-event-class/) as a parameter. You can ge...
Histogram support
Answered: Unfortunately a histogram is not available at the moment. There is a similar feature that you might be able to use to display the resource utilization/overbooking: https://javascript.daypilot.org/dem...
Renewal option
Answered: You can renew later but the renewal will always start on the expiration date.
Angular CLI - Module build failed: RangeError: Maximum call stack size exceeded
Answered: I've tested a clean new project generated using Angular CLI 1.7.4 and it works fine. After adding DayPilot Pro 8.4.3056
npm install https://npm.daypilot.org/daypilot-pro-angular/trial/8.4.3056.tar....
AllowEventOverlap for specific resources
Answered: Just in case anybody stumbles over this problem or wants to achieve something similar I found this page (https://doc.daypilot.org/scheduler/event-moving-customization/) very helpful. You can basicall...
Can't drag events when a cell is disabled
When I disable a cell and try to drag an event that starts (or ends) outside the current view to another enabled cell, I get the above error on console. Nothing happens after it. ERROR TypeError: Can...
Update multiple Event to server in loop
Answered: If you have 300 events in events.list this code will fire 300 HTTP requests which will complete in more or less random order. In the success callback, you are requesting a full update() - the update ...
addClass for cell?
Answered: You can use DayPilot.Util.addClassToString() helper method:
args.cell.cssClass = DayPilot.Util.addClassToString(args.cell.cssClass, "my-class");
This will handle the spaces and also check if "my-...
Daypilot scheduler 2018.1.3203. showNonBusiness false still shows weekends
Answered: This behavior was caused by a bug. It's fixed now in the latest sandbox build (2018.2.3214): https://javascript.daypilot.org/sandbox/ Please let me know if the problem persists.