Questions Tagged javascript
Disabling thick boarders when generating custom timeline
Answered: This is a line that is highlights places where the timeline is interrupted (a cell doesn't start at the same time where the previous cell ends). You can override the CSS manually like this (for the d...
Scheduler Event backcolor Revert back after loading
Answered: If you add events using .events.add() you don't need to call .update() to apply the change. The Scheduler will be updated automatically. Also, calling .update() in every iteration of the loop is very...
events empty
Answered: It looks like you are calling the .update() method too much. The update() is performed asynchronously a multiple simultaneous calls may disrupt the display. It's not necessary to call .update() befor...
limitations trial version?
Answered: You can use the browser console to check if there is any error in the input data. Just type:
dp.resources
to see the resources array. The trial version will display 71 rows without any problem. T...
External drag and drop to another grid is not working for Mobile devices
Dear colleagues, This is a rather important issue for our company. We've implemented drag and drop from one schedule grid to another. Everything works well, but not in IPad and other mobile devices. ...
resources dynamic data Asp.net
Answered: There is now a new tutorial available that shows how to load resources and events in JSON format from a server-side endpoint created using ASP.NET Core: https://code.daypilot.org/99410/javascript-htm...
HTML5 Doctor Appointment Scheduling (JavaScript/PHP) - Js Error on Demo
Answered: As far as I can see there is a problem with double-clicking the grid when timeRangeSelectedHandling is set to "Disabled" (the default value is "Enabled") and timeRangeSelectedDoubleClick is set to "E...
DEMO NOTE (ORANGE IN EVENT CALENDAR)
Answered: As noted in the tutorial text, the project download includes a trial version of DayPilot Pro that displays the DEMO label. It's licensed for evaluation purposes only. If you want to use the tutorial ...
Resource Title Undefined in Scheduler
Answered: Worked out the issue, need to set the header to json reponse header('Content-Type: application/json');
Override Daypilot.min.js function
Answered: In case of the ASP.NET WebForms version the client-side library is embedded in the DLL and it's inserted into the page using internal ASP.NET mechanisms. As far as I can tell it's impossible to inser...
How to leave blank area in time header when group is collapsed
Answered: I made a wrapper for daypilot and override method _getScrollableWidth. if (innerHeight > height && !autoHeight && this.reserveSpaceForScrollBar === undefined) || this.reserveSpaceForScrollBar) { scro...
Assign Multiple Background Color to an Event
Answered: You can insert custom segments into an event using "active areas": https://doc.daypilot.org/scheduler/event-active-areas/ You can specify the active area position using start/end properties instead o...
How to Get Specific Date of An Event
Answered: The current position in the grid (in pixels) is stored in DayPilot.Scheduler.coords object. This value is updated in real time:
var coords = dp.coords; // coords.x, coords.y
You can use DayPilot....
Javascript Date To Daypilot Date Conversion
Answered: The constructor has a second parameter which lets you specify whether to use the GMT base or local representation of Date object. This call will use the local representation:
var local = new DayPil...
Mouse click on the cell not exactly
Answered: i found the reason why, because parent tag has a style with value: "margin-top: 50", change to: "padding-top:50" and it worked perfect ^_^
Javascript breaks when hover scroll bar
Hello, I am using DayPilot.Web.MVC version 8.3.5880.1 and daypilot-all.min.js version 2937. When I hover the scheduler scroll bar, on the bottom of the scheduler, I get this error message: "Unhandled...
DayPilot Scheduler (JavaScript) with SQL Server backend
Hi everyone, Is it possible to use the Scheduler (JavaScript) with a SQL Server database? I see in the tutorials that MySQL & SQLite can be used with PHP backend. I'd like to implement the DPS using ...
Menu: menu is not defined
Answered: 1. The "contextMenu" property specifies a context menu for events. It's activated when you right-click an event (the default eventRightClickHandling value is set to "ContextMenu"). You can also map i...
loadEvents(); wanted to call every 10 sec
Answered: Thanks for the update. There is also a built-in AutoRefresh feature that is a bit smarter (it doesn't fire if a drag and drop operation is in progress): https://doc.daypilot.org/scheduler/autorefresh/
onTimeRangeSelected: giving 3 value start/end/resource
Answered: The original data object is accessible as "data" property of the row object. You can get the row object (DayPilot.Row class) using .rows.find():
var row = dp.rows.find(args.resource);
var rm_cat =...
Add or remove doctors
Answered: Management of doctors is not implemented in this tutorial. The doctor data is stored in the database, in a table called "doctor":
CREATE TABLE doctor (
doctor_id INTEGER PRIMARY KEY AU...
how to create simple modal, can i have snippet please
Answered: You can display custom HTML using DayPilot.Modal.showHtml():
var modal = new DayPilot.Modal();
// ...
modal.showHtml("<div>text</div>");
How to show Active Areas in Angular4
Answered: You might be defining onBeforeEventRender handler too late in the component lifecycle (after it is rendered). Try adding it to the config object (see also the Angular 4 Calendar tutorial at https://c...
Export Calendar Month with different event colors
Answered: The event colors should be already fixed in the latest sandbox version (since build 2936): https://javascript.daypilot.org/sandbox/ The TypeScript definitions [missing exportAs()] will be updated sho...
Drag&Drop of events which cross the border of visible period
Hi! Here is an issue with events which cross the border of the beginning of the visible period. Every event is bound to the start date. But in this case the start date isn't even displayed. So we can...
How to highlight area on Scheduler when clicked on an event
Hi everybody, There is few time I have started to use Daypilot for JS. But now I have a problem that not seems to be in "Demo" section. My goal is to highlight some area when an Event is selected. Fo...
Month problem
What if our project has many tasks throughout a couple of months. How can I show the diff tasks on the same chart although they're on different months?
How to highlight the busy days in angular2
Answered: <daypilot navigator [config]="navigatorConfig" [events]="events" [(date)]="calendarConfig.startDate"></daypilot-navigator> here [events]="events" is list of events which is used in calendar so same c...