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

Popup Window

Asked by Dragan
9 years ago.

I use this code but don't popup the PopupNew.aspx giv me this error: Microsoft JScript runtime error: 'start' is undefined, i don't know where i make mistake? Can you help me what i need to write in code?:

<%@ Page Title="" Language="C#" MasterPageFile="~/Pocetna.Master" AutoEventWireup="true" CodeBehind="Events.aspx.cs" Inherits="Rezervacii.Events" %>
<%@ Register assembly="DayPilot" namespace="DayPilot.Web.Ui" tagprefix="DayPilot" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript">
function openPopup(start, end, column) {'PopupNew.aspx?start=' + DayPilot.ds(start) + '&end=' + DayPilot.ds(end) + '&column=' + column, 'NewEvent', 'width=400,Height=400,top=200,left=200');

<DayPilot:DayPilotCalendar ID="DayPilotCalendar1" runat="server"
BusinessEndsHour="19" DataEndField="eventend" DataStartField="eventstart"
DataTextField="name" DataValueField="id" Days="7" TimeFormat="Clock24Hours"
TimeRangeSelectedJavaScript="openPopup(start, end, column);" />

Answer posted by Dan Letecky [DayPilot]
9 years ago.

In the Lite version, the start, end, and column variables are not available in TimeRangeSelectedJavaScript.

You need to use {0} and {1} strings:

  • {0} will get replaced by the time range start and
  • {1} will get replaced by the resource id


TimeRangeSelectedJavaScript="openPopup('{0}', '{1}');"


function openPopup(start, column) {'PopupNew.aspx?start=' + start + '&column=' + column, 'NewEvent', 'width=400,Height=400,top=200,left=200'); 
Comment posted by Dan Letecky [DayPilot]
9 years ago.

Update: {1} is only available in DayPilotScheduler.TimeRangeSelectedJavaScript.

DayPilotCalendar doesn't support custom columns in the Lite version.

Comment posted by Dragan
9 years ago.

Ok thank you, i solved this like you write in the code, now when i click in the calendar in the popup window display only date, how to display date and clock in this format, 19.09.2012 13:30:15 ? What i need to write in code?

Comment posted by Dragan
9 years ago.

With this line only display date 19.09.2012:
TextBoxStart.Text = Convert.ToDateTime(Request.QueryString["start"]).ToShortDateString();

Comment posted by Dragan
9 years ago.

ok , i solved :)

TextBoxStart.Text = Convert.ToDateTime(Request.QueryString["start"]).ToShortDateString() + Convert.ToDateTime(Request.QueryString["start"]).ToLongTimeString();

Comment posted by Anj123
9 years ago.

How to capture end in Lite version?

This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.