Questions Tagged javascript
Business Begins/Ends
Answered: Yes, it is possible using onBeforeCellRender: https://api.daypilot.org/daypilot-scheduler-onbeforecellrender/ This will change the status of the cell and the associated background color but it will n...
Showing event versions in the same 'row'
Answered: You can do this by creating a single version (with a transparent background) and adding the two active areas inside:
onBeforeEventRender: function(args) {
args.data.versions = [
{
...
DayPilot parse date with shortened year notation gives an error
Answered: It was intentionally not implemented in DayPilot.Date.parse() because of the ambiguity (and the docs was not correct - it was only supported in toString()). Anyway, it's now supported in the latest s...
rowHeaderColumnResizedHandling - What event is triggered?
Answered: It fires onRowHeaderColumnResized event: https://api.daypilot.org/daypilot-scheduler-onrowheadercolumnresized/
time header
Answered: You can use a special frozen row at the top which will let you select a time range and expand it to the full column. Please see the following tutorial: https://code.daypilot.org/50252/javascript-sche...
How to set cell width per column?
Answered: The Scheduler lets you define column widths if you use a custom timeline: https://doc.daypilot.org/scheduler/timeline/ The Calendar and Month components don't allow specifying individual columns widt...
Drag and Drop event from one calendar to another
Answered: Unfortunately, drag and drop between components is not supported by the Calendar (only by the Scheduler).
Extending the separator to the timeheaders
Answered: You shouldn't add borders to the main time header div (.scheduler_default_timeheader_cell) because it changes its dimensions (it uses the default "box-sizing: content-box" style). The borders are def...
Day pilot dragdrop insert 2 rows. (angular)
Answered: This should be fixed now in the latest sandbox build (2020.3.4657). Please let me know if the problem persists.
Ignoring left click behaviour for events
Answered: There is an event that lets you override the standard mouse behavior but it works on the grid layer only (below events): https://api.daypilot.org/daypilot-scheduler-ongridmousedown/ If these events a...
Set event in multiple days
Answered: I recommend checking the date values. The Scheduler doesn't shorten events and the start and and date/time will correspond to the calculated timeline position. You can see that multi-day events are d...
How to show results for half an hour in timeHeaders
Answered: Please see this grouping option:
groupBy: "Cell"
https://doc.daypilot.org/scheduler/time-header-groups/
Changing scheduler settings in CSS
Answered: You need to use more specific selectors, e.g.
#dp .scheduler_default_matrix_vertical_line,
#dp .scheduler_default_matrix_horizontal_line {
background-color: #000000;
}
or add "!important"...
Max Width for rowHeaderWidthAutoFit
It would be great, if a maximum width setting for rowHeaderWidthAutoFit could be implemented. Should be trivial to implement in _autoRowHeaderWidth but I did not want to patch it to stay with the sta...
Using Daypilot vue sample with vue v3 did not work.
Answered: Vue 3 is now supported (since build 2020.4.4798).
Delete events based on ids stored in an array
Answered: array.forEach(function(id) {
dp.events.remove(id);
});
Click Event/Active Areas not working properly with touch screens
Answered: On touch devices, the active areas with visibility: "Hover" won't be displayed as there is no hover event. In some edge cases, the mobile browsers will fire mousemove event which is used to detect th...
How to Hide Context Menu Item
Answered: You can do this in onShow event handler - it's called before the menu is displayed and you can use it to modify the context menu items. You can find an example here: https://api.daypilot.org/daypilot...
Resource label vertical alignment on concurrent event
Answered: Unfortunately, this is not possible at the moment. You can modify the CSS and show the row header title at the top of the cell (the middle position may not work well for large heights).
How to get resource name instead of ID
Answered: You can get the row object (DayPilot.Row) using rows.find():
dp.onEventMove = function(args) {
var row = dp.rows.find(args.newResource);
// ...
};
It's also possible to use onEventMoving i...
Add/edit events with in-place editor
Answered: The keyboard navigation tutorial is now available: https://code.daypilot.org/29708/javascript-scheduler-keyboard-navigation
rowsfrozen last row disappear
Answered: This issue should be fixed now in the latest sandbox build (2020.3.4603): https://release.daypilot.org/changes/js/ Let me know if the problem persists.
Allow to do a Rectangle selection on Row without snapping to the grid
Answered: This option is now available through snapToGridRectangleSelecting property in the latest sandbox build (2020.3.4604): https://release.daypilot.org/changes/js/
Version 2020.3.4594 daypilot-core.d.ts loadingText is a number
Answered: Hi Ruud, Thanks for reporting the issue - it's fixed now in the latest sandbox build and it will be included in the next release: https://release.daypilot.org/changes/js/
ScrollToResourse() in dynamic event rendering
Answered: It looks like the onAfterRender event handler wasn't fired properly if args.clearEvents was set to true in onScroll (and that is the default value). It should be fixed now in the latest sandbox build...
Edit appointment screen not showing all fields
Answered: It looks like there is a problem with SQL on line 51 (appointment_edit.php) which works in SQLite but not in MySQL:
foreach ($db->query('SELECT * FROM [doctor] ORDER BY [doctor_name]') as $item) {
...
Daypilot Scheduler - Bubble shown on different page
Answered: There is a static DayPilot.Bubble.hide() method that will hide the current bubble immediately: https://api.daypilot.org/daypilot-bubble-hide/
Event counter per day
Hello, I'm building a scheduler with 3 different possible events for each resource and I would like to get the number of these events for all the resources per day. Do you think there is a solution? ...
DayPilot Pro for JavaScript (Web Start) $499
Answered: Yes, the Angular Scheduler component is part of DayPilot Pro for JavaScript: https://javascript.daypilot.org/buy/
exportAs printing method throws an error
Answered: I do not see any error with the latest release so I recommend giving it a try. Please let me know if the problem persists.