i am getting this Javascript error "DayPilotMonth is undefined" after getting the 4.6.1389 build from you guys to fix the next month bug yesterday (3/31).
<script type='text/javascript'>
function dpm_Init() {
var v = new DayPilotMonth.Month('DayPilotMonth1'); <--------------error points to this line, script from you guys, not o ur code.
hmm, weird, the above error i was getting while setting my date back to yesterday(3/31), now i set it back i am getting a different javascript error. 'HeaderBackColor' is null or not an object on some of my calendars, some works.
The "DayPilotMonth is undefined" error can happen in two cases:
- The JavaScript code is not properly loaded (it's loaded using WebResources.axd reference).
- There is an syntax error inside the JavaScript code. That prevents the DayPilotMonth class from being defined.
I've tried the build 1389 and it seems that it's not caused by a syntax error (the demo works fine).
I would suggest that you try reloading the page using Ctrl+F5. If that doesn't help, try to look at the actual WebResource.axd content - Firefox + Firebug might help here. There will at least two WebResource.axd references: one defining DayPilotMonth (Month.js in the sources) and common definitions (Common.js in the sources).
It might render ASP.NET exception page instead of the JavaScript code in some cases. It can happen if you use URL redirection, authentication, etc.
<script src="/WebResource.axd?d=tH6T-w3oY7ab0jjq_9haMyxj96L4_7VwoGenRl41ulXBLeMD5GyyP-e3b1Vel98w0&t=633426324080000000" type="text/javascript"></script>
<script src="/WebResource.axd?d=tH6T-w3oY7ab0jjq_9haM9iI1_4VetEUReKlmjNEgOui8qNM4eTE1uyeN0bAba-V0&t=633426324080000000" type="text/javascript"></script>
<script src="/WebResource.axd?d=tH6T-w3oY7ab0jjq_9haM102MPbJ0yqj4M_BvKxajlKM5oL6F9IpzuL1xa9UPewd0&t=633426324080000000" type="text/javascript"></script>
i checked all three of these .axd and they all seems to load fine.
My page is as simple as this.
<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="Calendar.aspx.cs" Inherits="Portal.Controls.Shared.Scheduler.Calendar" Title="Event Calendar" %>
<%@ Register Assembly="DayPilot" Namespace="DayPilot.Web.Ui" TagPrefix="DayPilot" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
</head>
<body>
<form id="form1" runat="server">
<div style="width: 100%">
<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server" />
<div style="text-align: left"><asp:Literal ID="litName" runat="server"></asp:Literal></div>
<div style="text-align: center; width: 100%">
<asp:Button ID="btnPrev" BorderStyle="Inset" BorderWidth="1px" BorderColor="Navy" ForeColor="Navy" BackColor="White" runat="server" Text="" />
<span style="font-weight: bold; font-size: 1.5em;">
<asp:Literal ID="Literal1" runat="server" Text="Label"></asp:Literal>
</span>
<asp:Button ID="btnNext" BorderStyle="Inset" BorderWidth="1px" BorderColor="Navy" ForeColor="Navy" BackColor="White" runat="server" Text="" />
</div>
<DayPilot:DayPilotMonth ID="DayPilotMonth1" runat="server" ClientObjectName="dpm" BubbleID="bubble" />
<DayPilot:DayPilotBubble ID="bubble" runat="server" Width="250" ClientObjectName="dpb" UseShadow="true"></DayPilot:DayPilotBubble>
</div>
</form>
</body>
</html>
with the new build i am getting the DaypilotMonth is undefined again.
loading the .axd (WebResource.axd?d=tH6T-w3oY7ab0jjq_9haMyxj96L4_7VwoGenRl41ulXBLeMD5GyyP-e3b1Vel98w0&t=633426735000000000) gets me this error.
Specified argument was out of the range of valid values.
Parameter name: utcDate
my other scheduler and week view throws same error too.