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
7 years 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
7 years 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]
7 years 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 1 months old and has been closed. Please create a new question if you have anything to add.