search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to Get Specific Date of An Event

Asked by Anonymous
10 months ago.

I want to get the specific 'date' when an onEventClicked is fired as shown in the attachment(7th). But in this case I only was only able to get the start date(6th) and the end date(10th) of the event.

Comment posted by Praneeth
10 months ago.

We are currently evaluation day-pilot as well and have a similar requirement. How can we get the selected resource ID, cell start and end dates when clicked on a specific point of an event strip?

Appreciate a suggestion on how to achieve this.

Answer posted by Dan Letecky [DayPilot]
10 months ago.

The current position in the grid (in pixels) is stored in DayPilot.Scheduler.coords object. This value is updated in real time:

var coords = dp.coords; // coords.x, coords.y

You can use DayPilot.Scheduler.getDate() method to get the date/time value.

Current mouse cursor position as date/time (DayPilot.Date object):

var date = dp.getDate(dp.coords.x, true);

Start of the current cell:

var date = dp.getDate(dp.coords.x);
This question is more than 6 months old and has been closed. Please create a new question if you have anything to add.