div id="container" >
<div id="content"> <div>
<div id="dp"></div>
<div id="print"></div>
<script type="text/javascript">
var empcount = 1;
var dp = new DayPilot.Calendar("dp");
dp.startDate = "2018-01-24"; // or just dp.startDate = "2013-03-25";
dp.days = 1;
dp.allDayEventHeight = 100;
dp.eventDoubleClickHandling = "Enabled";
dp.timeRangeDoubleClickHandling = "Enabled";
dp.moveBy = 'Full';
if(empcount > 9){
dp.columnWidthSpec = "Fixed";
dp.columnWidth = 150;
}
dp.cellDuration = 15;
dp.dayBeginsHour = 10;
dp.dayEndsHour = 19;
dp.cellHeight = 15;
dp.heightSpec = "Fixed";
dp.height = 470;
dp.viewType = "Resources";
dp.columns = [{"name":"san","id":"70"}];
dp.events.list = [];
//dp.bubble = new DayPilot.Bubble();
dp.bubble = null;
dp.contextMenu = new DayPilot.Menu({
cssClassPrefix: "menu_default",
items: [
{text:"Show event ID", onclick: function() {alert("Event value: " + this.source.value());} },
{text:"Show event text", onclick: function() {alert("Event text: " + this.source.text());} },
{text:"Show event start", onclick: function() {alert("Event start: " + this.source.start().toStringSortable());} },
{text:"Delete", onclick: function() { if(confirm("Do you really want to delete?")) {
console.log(this.source);
dp.events.remove(this.source);
dp.message("<span id='delete_msg'></span>");
} } }
]});
dp.onEventMoved = function (args) {
if(validateDate(args.e.data.start.value)){
moveBooking(args);
}
};
dp.onEventResized = function (args) {
dp.message("Resized: " + args.e.text());
};
dp.onTimeRangeDoubleClick= function(args) {
alert("DoubleClick: start: " + args.start + " end: " + args.end + " resource: " + args.resource);
};
dp.onEventDoubleClick = function(args) {
updatebooking(args.e.id());
};
dp.onBeforeEventRender = function(args) {
args.data.barColor = "red";
};
dp.init();
var e = new DayPilot.Event({
start: new DayPilot.Date("2013-03-25T12:00:00"),
end: new DayPilot.Date("2013-03-25T12:00:00").addHours(3),
id: DayPilot.guid(),
text: "Special event",
resource: "J"
});
dp.events.add(e);
</script>
</div>
</div>
</div>
I have enabled timeRangeDoubleClickHandling but its not working still.
Please suggest me what is wrong in this code?