Questions Tagged how-to
How to disable rowheadercolumn resizing?
		
		Answered: The latest sandbox build (2019.2.3812) now supports rowHeaderColumnsResizable property which lets you disable the row header column resizing: 
dp.rowHeaderColumnsResizable  = true;
 When the resizi...
	
	
	
	Adding extra fields in the db
		
		Answered: You can have custom fields in the db table. In ASP.NET, you can load them using DataTagFields property: https://doc.daypilot.org/calendar/event-loading/ https://doc.daypilot.org/month/event-loading/ ...
	
	
	
	Allocating a color to each event
		
		Answered: Please see the documentation: https://doc.daypilot.org/month/event-customization/
	
	
	
	How can I fix the position of the event when event overlaps?
		
		Answered: You can apply custom sorting rules to overlapping events. Please see the example in the documentation: https://doc.daypilot.org/scheduler/event-sorting/ Let me know if this is not what you are lookin...
	
	
	
	External drag and drop not working on application (web forms)
		
		Answered: Please take a look at this demo: https://aspnet.daypilot.org/demo/Scheduler/ExternalDragDrop.aspx The source code of this demo page is included in the download package. You can use it as a starting p...
	
	
	
	Multi-year 52 week planner
		
		Answered: Yes, you can use scale: "Week" which uses a week as a cell size: https://javascript.daypilot.org/sandbox/scheduler/scaleweeks.html The week start is determined using the current locale (https://api.d...
	
	
	
	How to make a deep-copy of a draggable event onto the scheduler
		
		Answered: Hi Christian, There are two options: 1. You can cancel the default action in onEventMove and create and add the event object manually using a deep copy of the data object: 
dp.onEventMove = function...
	
	
	
	Is it possible to dragdrop an external element ON TO a target existing event and then do post processing?
		
		Answered: You can use standard HTML5 drag and drop API to implement this functionality. Please see the following example: https://code.daypilot.org/12371/javascript-scheduler-events-as-drag-and-drop-target
	
	
	
	How to collapse all groups by default ?
		
		Answered: You probably mean the Gantt chart which displays the nodes expanded by default. You can override the default value using row.collapsed property of the data object: 
{
  id: 1
  start: "2019-01-01T...
	
	
	
	How to call custom function in onTimeRangeSelected
		
		Answered: When you use the JavaScript declaration style you won't be able to access the component object as "this": 
onTimeRangeSelected: function(args) {
  // ...
  this.myFunction();  // won't work
}
 I...
	
	
	
	Get calendar for full year
Hi, I would like to ask how can we get full year calendar? I want to add 12 pages in pdf for 12 months of the selected year. Is It possible with this?
	
	
	
	Screen Resolutions and exportAs()
		
		Answered: The Calendar and Month components now support options.width parameter that will let you override the dynamic width calculated from the current view. It's available since build 2019.1.3595 (see the sa...
	
	
	
	Split event into multiple event-parts because of business hours
		
		Answered: Hi Wolfwgang, Sorry for the delay. This scenario is not supported at the moment. However, you can do it the other way around - instead of hiding parts of the event you can hide the non-business parts...
	
	
	
	How do I make my DayPilot Month Calendar to be Read Only in Asp.Net MVC?
		
		Answered: You can make it read-only by disabling the drag and drop actions one by one: 
@Html.DayPilotMonth("dpm", new DayPilotMonthConfig 
{ 
BackendUrl = Url.Content("~/Home/Backend"),
EventMoveHandlin...
	
	
	
	Row header click isn't working
		
		Answered: The problem was because of "e" parameter, it shouldn't be there
	
	
	
	Missing something...
		
		Answered: It looks like you might have overwritten the index.html file with one generated using the UI Builder (the generated index.html uses resources array with Resource 1 and Resource 2 defined). If you dow...
	
	
	
	Create event from UTC
I'm trying to add a new calendar event from a UTC string coming from my server. How do I create an event from my UTC string? After I add the event it shows the event for 9:00pm when it should show 1:...
	
	
	
	MVC with Foreign Key
I'm using daypilot on a ASP.NET Core but my model has a foreign key and I can't add a date for that reason, what can I do? or why I can't add a date, this is my code public class Reservacion { public...
	
	
	
	How to show week number in Weekly view calendar?
		
		Answered: You'll need to switch to the Resources view and generate the column hierarchy manually. Please see more here: https://doc.daypilot.org/calendar/column-header-hierarchy/
	
	
	
	How to show Event name as tooltip in navigator?
		
		Answered: Unfortunately, the navigator doesn't support showing event details. It can only show free/busy status for the visible days.
	
	
	
	How to change the position of next and prev buttons in Day pilot navigator or manually invoke the methods associated with these two buttons?
		
		Answered: The position of the next/previous buttons can't be changed. However, you can hide it using CSS and switch the dates manually using the select() method: https://api.daypilot.org/daypilot-navigator-sel...
	
	
	
	How to show week number in Monthly calendar View?
		
		Answered: You can show the week numbers in the first cell using onBeforeCellRender. Example for ISO week number (week starting on Monday): 
dp.onBeforeCellRender = function(args) {
  if (args.cell.start.getD...
	
	
	
	Load events with skipping non business cells.
		
		Answered: The events are defined using start/end (not using start and duration). When creating new events using the Scheduler with non-business days hidden the Scheduler will return the correct dates (taking t...
	
	
	
	Alternating row colors when some rows are hidden
		
		Answered: The latest sandbox build (2019.1.3540) supports args.cell.displayY in onBeforeCellRender and args.row.displayY in onBeforeRowHeaderRender that you can use to get the display Y position. No two adjace...
	
	
	
	additional parameters when using onLoadNode
		
		Answered: If you need to get client-side state on the server side you can use clientState property to store it (typically it's used for storing filter rules): https://doc.daypilot.org/scheduler/clientstate/ Wh...
	
	
	
	How to use the Daypilot.menu.shadow
		
		Answered: The context menu doesn't support an overlay that would block access to the background. If you want to block the background you can use the modal dialog instead: https://code.daypilot.org/81367/daypil...
	
	
	
	How to adapt header size to the text ?
		
		Answered: This should be done automatically when the "row header with auto-fit" feature is enabled (it is enabled by default): https://doc.daypilot.org/scheduler/row-header-width-auto-fit/ Please let me know i...
	
	
	
	Rectangle Selecting color area
		
		Answered: Build 2019.1.3539 now lets you customize the appearance using *_selectionrectangle class ("scheduler_default_selectionrectangle" for the default theme). The default definition looks like this: 
.sch...
	
	
	
	Angular Scheduler - Horizontal scroll position
		
		Answered: It looks like the problem might be the scrollTo/scrollX/scrollY properties in the scheduler config object. If you add them to the config they will be re-applied whenever the Scheduler detects a chang...