Questions Tagged javascript
Clear all the events from the calendar with javascript
Answered: Hi Philippe, The events are stored in .events.list array - so you can do something like this:
dpc1.events.list = [];
dpc1.update();
See also: https://api.daypilot.org/daypilot-calendar-events-li...
How to limit appointment time only to 30 minutes?
Answered: 1. The default appointment slot duration is set in "backend_create.php" file using $slot_duration variable:
$slot_duration = 60;
You can change it as needed. 2. Yes, you should change sesion_id t...
Calendar events not updating
Answered: 1. If you have a complete data set that you want to display (i.e. you don't plan to apply any "diff" to the event set) the recommended way is to assign the array directly to .events.list:
vm.calend...
Angular2 scrollTo() on click event
Answered: This issue should be fixed now in the latest sandbox build (8.3.2510): https://npm.daypilot.org/ You can use the following code to keep the current position when changing the scale/cellDuration/cellW...
How-To: Change Week Start for DayPilot.Calendar (Week View)
Hi, How can I change the week view start day? It keeps defaulting to Sunday to Saturday. I would like to have it as Monday to Sunday. Please see attached image. Navigator is correct but Calendar not....
Resources not showing with dynamicLoading = true
Answered: I figured out what the problem was after testing my data on the dynamic example. I had not added args.loaded() in my onScroll function. After adding that the rows are loaded correctly, but with a del...
JavaScript month calendar: drag & drop
Hi, Is there any support for dragging and dropping of events in the month calendar control? If so, could you please elaborate? Thanks! Richard
Get Resource Parent ID
Answered: You can do it like this:
var parentId = dp.rows.find("A").parent().id;
See also: https://api.daypilot.org/daypilot-scheduler-rows-find/ https://api.daypilot.org/daypilot-row-parent/
Display google calendar data in DayPilot
Is there a way / tutorial how to display google calendar data on the fly in DayPilot scheduler?
onRowFilter - error on cells.all()
Answered: This event handler is called during the update process. The rows.cells.all() method will only work correctly when the update is complete. What would you like to achieve? Hide a row that doesn't have ...
design
Answered: You can customize the appearence by creating a custom CSS theme. You can use the online theme designer to generate a new theme: http://themes.daypilot.org/ The generated CSS file can be also customiz...
Using Scheduler as syntax with events
Answered: Your setup seems to overwrite the "events" property of the DayPilot.Scheduler object somewhere. The events property holds not only the event data (events.list) but also other methods (events.update()...
Ctrl+Shift Keys
Answered: Workaround done. Problem fixed. Handling the onEventRightClick Event. if (args.originalEvent.ctrlKey==true) { args.preventDefault(); }
Disable Room booking for Past Dates
How can i Disable New reservation pop up opening for Past Dates?
Cannot read property 'exp' of undefined
Answered: As far as I can tell there is no "exp" property in DayPilot. It looks like it's related to watching changes of an object that you reference using "config" or "events" attributes. The slowdown is also...
How-To: Remove debugging (Scheduler)
Answered: This was a temporary issue of the sandbox build. The latest sandbox build doesn't print it anymore (8.2.2396): http://javascript.daypilot.org/sandbox/scheduler/
Printing / Exporting scheduler with HTML in the events
Answered: At this moment the export doesn't support HTML. There are onBefore*Export events that let you supply alternative text: https://api.daypilot.org/daypilot-scheduler-onbeforeeventexport/ https://api.day...
How-To: Create an event when... (Scheduler)
Answered: It's possible to add an extra margin to the bottom (or top) of the row: https://doc.daypilot.org/scheduler/row-height/
dp.rowMarginBottom = 5;
All cards hiding when collapse one swimlane
Answered: This bug is fixed in the sandbox build already: http://javascript.daypilot.org/sandbox/ The fix will also be included in the next official release.
How-To: Alter Duration Over Date Range (Scheduler)
Answered: It's possible to highlight the busy hours inside an event using custom active areas. Example that highlights 9am - 5pm (on workdays) inside an event:
dp.onBeforeEventRender = function(args) {
va...
How-To: Alter Working Hours (Scheduler)
Answered: Yes, you can do it using businessBeginsHour and businessEndsHour properties. See also: https://doc.daypilot.org/scheduler/business-hours/
Angular 2 Troubleshooting
Answered: Ok well my fault so here was the issue: I add that line I mentioned to the angular-cli.json Which is what I have done for every other 3rd party control in this project. I took that line out to stay i...
Event overlap true. Set maximum events per day
Hi! I would like to have multiple events in one day. I set eventoverlap to true. (hotel reservation system) But I would like to set limit per day. Is there anything like this? I think, I saw it somew...
After import csv, cant see events in calendar
Hi I am using hotel reservation system. After importing values into table reservations -> LOAD DATA LOCAL INFILE 'test.csv' INTO TABLE temp CHARACTER SET utf16le FIELDS TERMINATED BY ';\0' LINES TERM...
Kanban: onBeforeCellRender in AngularJS
Answered: This happens because event handlers specified using on-* attributes automatically wrap the code in an $appy() block - to make the behavior consistent with the standard AngularJS behavior. This isn't ...
Kanban: Active Column in AngularJS
Answered: There was a bug - the Kanban control made some direct changes to the column.areas array during an update which triggered another update... It should be fixed now in the latest sandbox build (8.2.2375...
Unable to hide non business hours
Answered: In the Calendar control this functionality is not controlled by "showNonBusiness" but using heightSpec property. In fact, there are two options: 1. Use heightSpec: "BusinessHoursNoScroll" https://doc...
Navigator selection days
Answered: It's in the wishlist but there is no specific time plan. There is an option to sponsor this feature if you'd like to set a fixed implementation date - please contact sales@daypilot.org if you'd like ...
Load resource data via ajax doesn't expand child nodes
Answered: You can expand the children by adding expanded: true property to the parent node:
[{"id":11,"name":"Dublin - EIRE","children":[]},{"id":24,"name":"My Venue","children":[]},{"id":25,"name":"Graham's...
Day border
Answered: One of the options is to add custom separators at the specified times (day starts): https://doc.daypilot.org/scheduler/separators/