Questions Tagged javascript
treeAutoExpand Option for GANTT
Answered: By default all nodes in the Gantt chart are expanded. You can override it for each node (task) by setting task.row.collapsed = true:
dp.tasks.list = [
{
id: 1
start: "2018-01-01T09:00:00",
...
Event Calendar hide weekends
Answered: If you'd like to display a custom number of consecutive days you can use "Days" view as described here: https://doc.daypilot.org/calendar/days-view/ It's also possible to display any combination of d...
bespoke development
Answered: Thanks Dan. In all honesty, it would still be over my head! Obviously, I'd like to licence your code, but would anyone else be interested in helping me adapt it to our specific needs? Thanks
Change the color of the event
Answered: If "events" holds an array of DayPilot.Event objects you need to change the background color like this:
// ...
evt.data.backColor = 'Gray';
// ...
instead of
// ...
evt.backColor = 'Gray'; ...
How can i translate days into another language
Answered: Please take a look at the Localization topic in the documentation: https://doc.daypilot.org/month/localization/ You can use one of the predefined locales or you can define your own. In addition to sw...
Cannot export or print schedule [AngularJS]
Answered: Update: The latest sandbox build (8.4.3098) accepts string, number and null (null was added in this build). The exception text now includes the value type. https://javascript.daypilot.org/sandbox/ Pl...
Event start end problem
Answered: By default DayPilot works with exact date/time points, i.e. an event with end specified as "2017-10-06T00:00:00" will end at the beginning of October 6, 2017 (midnight). There is an option to change ...
Exact timerange selection when useEventBoxes is set to never.
Answered: In addition to useEventBoxes which affect the display of existing events there is also snap-to-grid feature which affects drag and drop: https://doc.daypilot.org/scheduler/snap-to-grid/ Unfortunately...
Moving all events from once resource to another
Answered: You can get a list of all events for a given row using DayPilot.Row.events.all():
var events = dp.rows.find("A").events.all();
Then change the "resource" value for all of them and call update:
...
Collapse all Rows
When I click to open a row, is it possible to collapse the other rows without foreaches? Thanks in advance!
how to recalculate overlapping in onEventMoving
Answered: Found a solution here. Adjusting the Target Position https://doc.daypilot.org/scheduler/event-moving-customization/
Clear cell values
Hi I have a resource called summary and showing the totals depending on resource. But when i changed the resource still showing the previous values. how can clear the values in some cells i.e is summ...
Move events dynamically joint
Hi, I'm using Daypilot Scheduler Javascript, and I'm wondering if the joint events feature could help me. What I'm trying the achieve is to move an event on the time axis using drag and drop, but at ...
Getting the filtered events
Hi, I have to get filtered events i mean events visible on the scheduler. Do we have any direct option or only through javascript function. thanks
Event move
Hi While moving the event,event is resizing.How to prevent resizing while moving the event Thanks
Want to show Cell in color
I want to apply color for cell if respective date is having more than 1 count...I am using now dp.onBeforeCellRender() for the same. But its not very usefull for me.
TimeRangeSelect shadow backcolor
How to customize the background-color of the timeRange on selecting?.
Uncaught String expected Error when export shceduler to jpeg
Answered: Please see a related question: https://forums.daypilot.org/Topic.aspx/4093/cannot-export-or-print-schedule-angularjs
modal dialog
Answered: You need to add the buttons yourself. The showHtml() doesn't add anything to the HTML and only displays what you supply. You can close the dialog by calling modal.close() method.
Apply style sheet in sheduler
Answered: The Scheduler marks the important elements with custom CSS classes (the names are derived from the theme names). You can find the list here: https://kb.daypilot.org/62119/list-of-css-classes-used-in-...
[Issue] DayPilot Month fires error "NotFoundError: Node was not found"
Answered: Hi all, after a hour, I anwsered by myself. Here is my solution: dpm.onTimeRangeSelected = function (args) { dpm.clearSelection(); args.preventDefault(); }
Incorrect position of bubble on event mouse hover in scheduler
Answered: Thanks! It should be fixed now in the latest sandbox build (8.4.3072): https://javascript.daypilot.org/sandbox/ Let me know if there is any problem.
getting selected events
Answered: This seems to work fine for me:
var dp = new DayPilot.Scheduler("dp");
// ...
dp.onEventMove = function (args) {
var selectedEvents = dp.multiselect.events();
};
dp.init();
If it still d...
Custom Tag - how to?
Answered: Your second example seems to work fine for me (in both AngularJS and plain JavaScript version). Just a couple of comments: 1. As you have noticed already, dataTagFields is not used in the JavaScript ...
Restrict the event to one week
Answered: You can customize the drag and drop operations using the real-time events: https://api.daypilot.org/daypilot-scheduler-oneventmoving/ https://api.daypilot.org/daypilot-scheduler-oneventresizing/ http...
Apply theme to scheduler
Answered: All themes (except of the embedded "scheduler_default" theme) are defined in separate css files which need to be included in the HTML page. You can find the themes in "demo/themes" directory of the d...
Daypilot Scheduler Event List has an event having id : "undefined"
Answered: The JavaScript Scheduler doesn't modify the "id" property of the event data object - I recommend checking your data source. Note that this is a very old DayPilot version which is not supported anymor...
uploading data
Answered: It turns out that the project included an incorrect version of _db.php that initializes the database. A fixed project is now available for download. The employees are stored in the database, in a tab...
Drag-Drop External event pops to first column
Answered: Figured it out: The second level columns need unique id's. They had id's from a for-loop that was reset for each first level column.
Angular 4+, event multi select
Answered: Yes, it is supported in Angular as well. In Angular, you just need to specify the properties and event handlers on the "config" object instead of DayPilot.Scheduler object. All features work the same...