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

Problems Migrating DayPilot Lite for ASP.NET MVC 1.3 SP1 (build 1.3.395)

Asked by Bobby
11 years ago.

Here are the steps I followed, although I was making it up as I went along:

1) Deleted the Reference DayPilot.Web.Mvc
2) Copied the new .dll from the Demo/Bin directory of the download to the bin directory of my project. I chose this file as oppose to the one from the Binary directory because it was larger and newer.
3) Registered the new .dll
4) Copied the daypilot-all.min.js file from the Demo/Scripts/DayPilot directory to the Scripts/DayPilot directory of my project. I did not delete the original files (common.js and month.js) from my project, although it appears that these files are no longer valid.
5) Modified the BundleConfig.cs file in the App_Start directory of my project to remove the references to common.js and month.js, and added the reference to daypilot-all.min.js. The new instruction is as follows:

bundles.Add(new ScriptBundle("~/bundles/app").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/DayPilot/daypilot-all.min.js"));

6) Did not remove the .css file (Content/DayPilot/themes.css). I do see where there is a layout.css file in the Demo project, but I did not do anything.
7) Modified the web.config to add the DayPilot namespace:

<add namespace="DayPilot.Web.Mvc"/>

Previous installation instructions indicated to add this namespace in the Views/Web.Config. I did not remove that one, so now it exists in both Web.Config files.

When I test my project, I get the:

Line: 76
Error: 'DayPilot' is undefined

Thanks in advance for your help... Bobby

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

This error suggests that the daypilot-all.min.js file was not included properly. This file defines the DayPilot namespace - it includes all the .js files merged (common.js, calendar.js, month.js, modal.js).

I recommend using browser developer tools (or Firebug) to check if the file was included properly (i.e. no 404 error) and if you can access DayPilot object (in the console).

Comment posted by Bobby
11 years ago.

Dan,

I am going to download firebug and follow your suggestions... Even an old dog can learn new tricks, right?

But I am confused... if I'm loading daypilot-all.min.js the same way I was loading month.js, what would change? Also, wouldn't VS2012 report an error if the code was missing a reference? Everything (well, almost) has worked great until this upgrade.

I'm really excited to leverage the updates introduced in this new release, so I really don't want to go backwards. And, I will try the toolset recommended here, but something sounds fishy like I missed a step.

Answer posted by Bobby
11 years ago.

After working with the code... debugging and such... it's come to my attention that renaming .min.js to .js works with the "bundles.Add(new ScriptBundle(".

Again, I am new with MVC, so I'm learning. If there is a better answer, I'm sure I could learn from that too.

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