i manage to show the scheduler bind with data from my database. But when i click on the free time slot it doesnt show a modal dialog for adding new event. i already include the modal.js in the js folder.
THIS is my javascript code:
<%@ Register assembly="DayPilot" namespace="DayPilot.Web.Ui" tagprefix="DayPilot" %>
<script type="text/javascript" src="js/modal.js"></script>
<script type="text/javascript">
function createEvent(start, end, resource) {
var modal = new DayPilot.Modal();
modal.top = 60;
modal.width = 300;
modal.opacity = 70;
modal.border = "10px solid #d0d0d0";
modal.closed = function () {
if (this.result == "OK") {
dp.commandCallBack('refresh');
}
dp.clearSelection();
};
modal.height = 500;
modal.showUrl("AddReservation.aspx?start=" + start.toStringSortable() + "&end=" + end.toStringSortable() + "&r=" + resource);
}
</script>
THIS is my aspx code:
<DayPilot:DayPilotScheduler ID="DayPilotScheduler1"
runat="server"
DataStartField="checkInDate"
DataEndField="checkOutDate"
DataTextField="reservationStatus"
DataValueField="reservationId"
DataResourceField="roomId"
DataTagFields="reservationStatus"
CellGroupBy="Month"
Scale="Day"
ClientObjectName="dps"
CellDuration="1440" RowHeaderWidth="100" CellWidth="80" style="top: 0px; left: 0px"
TimeRangeSelectedHandling="JavaScript"
TimeRangeSelectedJavaScript="createEvent(start, end, column);"
OnCommand="DayPilotScheduler1_Command">
</DayPilot:DayPilotScheduler>
I have no idea why i doesnt show a modal dialog. PLEASE HELP