How to retrieve the position of the selected cell ?
Asked by Laurent
13 years ago.
How to retrieve the position of the selected cell on The Calendar in Javascript ?
I want to bring up a TextBox on top of the clicked cell à the position of the selected cell.
Acually I've this code but the position of the mouse click is not on the top of the cell.
DayPilotCalendar.TimeRangeSelectedJavaScript = "ClicCaseVide(event, start, end, column);";
DayPilotCalendar.TimeRangeSelectedHandling = DayPilot.Web.Ui.Enums.TimeRangeSelectedHandling.JavaScript;
function ClicCaseVide(e, start, end, column)
{
var div = document.getElementById('TxtBoxCreateRDV');
PosX =(ev.clientX + document.documentElement.scrollLeft);
PosY = (ev.clientY + document.documentElement.scrollTop);
div.style.left = PosX + 'px';
div.style.top = PosY + 'px';
div.style.visibility = "visible";
}
Thank you.
Laurent.