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.
Comment posted by Ian Chan 18 years ago.
also the monthview filesare gone from the demo codes
Comment posted by Dan Letecky 18 years ago.
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.
Comment posted by Dan Letecky 18 years ago.
The month view demo was moved from Demo/Calendar/MonthView.aspx to Demo/Month/Default.aspx.
Oh, sorry. I can see the problem now. This happens only when you don't handle BeforeCellRender event. I'm sending a fixed build.
Comment posted by Ian Chan 18 years ago.
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.
Comment posted by Ian Chan 18 years ago.
hmm, it works on my coworker's machine. I think it has something to do with my date time setting on my local.
Comment posted by Dan Letecky 18 years ago.
It seems that this exception is caused by the ASP.NET server system date being smaller than an assembly build date (see also http://www.google.com/search?q=utcDate+specified+argument).
It happens because you are you have set your computer's date to 3/31/2008 and the daypilot.dll build date is 4/1/2008.
Comment posted by Ian Chan 18 years ago.
ahh, ok. Everything seems fine now, thank you for the quick response. Appreciate it.
This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.