Questions Tagged how-to
Cell customize
Answered: I'm not sure if this is exactly what you are looking for but you can get a list of events the overlap a given cell in onBeforeCellRender using args.cell.events(). See also: https://api.daypilot.org/d...
New Lines in DataTextField
Answered: Oh nevermind, I just replaced Environment.NewLine with <br /> and in wrote protected override void OnBeforeEventRender(BeforeEventRenderArgs e) { e.Html = e.Text; } works nice now, there are new line...
Reloading daypilot control based on dates from textbox
How to reload daypilot scheduler based on date entered in a text box? Currently thought it taking value, once form is loaded, it show data loaded first time. Kindly assist
Half Day Blocks
Answered: Found a solution... function onEventMoving(args) { args.start = args.start.getDatePart().addHours(12); args.end = args.end.getDatePart().addHours(12); }
Event for ContextMenuSelection
Hey everyone, I tried to call a method in my contoller via a the MenuItemAction. In the normal ContextMenu the "OnEventMenuClick" event gets fired. So I want to know which event is for the ContextMen...
Change actual date to "Day 1" for shift cycle
Is it possible to change the actual date in the header, e.g. 02/16/2017 to "Day 1", "Day 2", etc.? This is useful when doing/showing shift cycles where a date is not relevant (dates are assigned late...
scrollToResource
I need to return the user to the last row they clicked on and see references to scrollToResource but it doesn't seem to exist in the Pro MVC build. Is there a way to do this in MVC?
Conditional Overlaps of Appointments?
Answered: You can use the real-time event handlers to implement it: EventMovingJavaScript EventResizingJavaScript TimeRangeSelectingJavaScript The latest sandbox build (8.3.3582) supports DayPilot.Row.events.f...
Default start time
Answered: In the Calendar control, you can use ScrollPositionHour property to set the initial scrollbar position.
Time and Attendance for ASP MVC
Hello, I am after a working time and attendance component with managers approval and invoicing - status (approval/rejected) and various states (like submitted, new, locked etc). So the same timesheet...
Monthly Time range selection is erratic
Answered: Thanks for the reply Dan. No issue with clearing it manually. It was just acting slightly different from the Lite version and wanted to be sure it wasn't something stupid that i did.
Grid Lines
Answered: If you mean the grid cells starting and ending at 12:00 (noon) instead of 00:00 (midnight) then this is implemented using a custom timeline feature: https://doc.daypilot.org/scheduler/timeline/ It's ...
User too much speed
Answered: The Scheduler supports BlockOnCallBack property that allows blocking the UI during CallBacks (until the CallBack is resolved). It temporarily places an overlay div over the Scheduler which prevents a...
Monthly Event Calendar - Steps after AJAX Calendar Event Moving not clear
Answered: To get it working you need these elements: 1. A MVC view with the calendar (Views/Home/Index.cshtml) 2. A controller action for this view (Controllers/HomeController.cs: Index() method) 3. A controll...
Cells drawing problem
Answered: Strange issue. The Scheduler doesn't get rendered properly when it's in a hidden part of a page during initialization (such as an inactive tab). This happens because the browser doesn't calculate dim...
Disable HeaderColumn resize
Hi, is there a method or a property to disable resize of HeaderColumns? I have created 3 custom columns in my scheduler and I really need to lock their size. Thanks Davide
How can I update the DayPilot in modal after adding events?
Answered: The Scheduler needs to read its own dimensions after rendering in order to render the current viewport. This isn't possible if the Scheduler is in a hidden area of a page (e.g. in a <div> with displa...
If you end modal with OK, it will result in an error.
If you end modal with OK, it will result in an error. Line: 1 Error: 'JSON' is not defined. It is normal to end modal with CANCEL
change the color
Answered: You can set the grid cell color using BeforeCellRender event handler. Alternate row colors: https://doc.daypilot.org/scheduler/alternate-row-colors/ Note that BeforeCellRender/e.X and e.Y are availab...
The END date will be added one day
Answered: This behavior is described here: https://doc.daypilot.org/scheduler/event-end-date-time/ You can switch the logic using EventEndSpec="Date" (the default value is EventEndSpec="DateTime"). Let me know...
Servers
Answered: With Angular CLI (which uses Webpack) the Angular 2 project needs to be run using "ng serve" (available as "npm run start"/"npm start") during development. That's why the tutorial uses two independen...
Change DurationBarColor when click
How can I change the DurationBarColor when I click on event? (Gantt) Is there a way that I can change a specific event style box from the program? When I tried the DurationBarColor it didn't work for...
How to hide Daypilot.contextMenu
Answered: You can use hideOnMouseOut property:
var dp = new DayPilot.Menu({
items: [ {...}, {...}],
hideOnMouseOut: true
});
How to change the Day Width
Answered: You can customize the cell width using cellWidth property. The Gantt chart component is based on the Scheduler and in uses the same API:
dp.cellWidth = 60;
dp.update();
Not allowed to add event on same place after Deleting the event
Answered: Got this to work with following code change:- let shiftToDelete = dp.events.find(this.selectedEventId); dp.events.remove(shiftToDelete); dp.clearSelection(); But is it necessary to call clear selecti...
Angular2 row filter + auto width
Answered: A tutorial on row filtering in Angular 2 is in the works and it will be published in a day or two. The row header width autofit should work fine, let me check that.
Open edit window after creating
Answered: It's possible to open the edit dialog on the client side as soon as the TimeRangeSelected callback is finished. You can pass custom data back to the client side using DayPilotCalendar.Update() and re...