0

The MVC 4.0 application works fine with IE 8, IE 9 and Chrome when the compilation debug ="true".

When set to compilation debug="false" and after adding BundleTable.EnableOptimizations = true in the BundleConfig.cs for the release, a date error appears on IE 8.

The field field name Date must be a date

On IE 9 and in Chrome the date fields are working fine.

So I suspected bundling issues, but when I checked the script bundle using developer tool - script tab, I can see the below mentioned part of the script at the end, which I understand that the bundle is delivered properly.

$('.datefield').datepicker({ dateFormat: "yy-mm-dd" });

Further the scripts works fine on IE 9.0 and Chrome, so I believe the bundling is working fine.

When in debug = true mode, the script works in IE 8.0 without any issues. If it is a jQuery script compatibility issue, then here also we should get error, right?

I verified that the script files dumped into browser in the debug mode is there in the bundleConfig Add().

Please help me to identify a fix for the IE 8.0.

Adding the script files I see in debug = true mode.

<script src="/Scripts/modernizr-2.5.3.js"></script>
<script src="/Scripts/jquery-1.7.1.js"></script>
<script src="/Scripts/jquery-ui-1.8.20.js"></script>
<script src="/Scripts/jquery.unobtrusive-ajax.js"></script>
<script src="/Scripts/jquery.validate.js"></script>
<script src="/Scripts/jquery.validate.unobtrusive.js"></script>
<script src="/Scripts/aml.js"></script>
CoOl
  • 2,637
  • 21
  • 24
N M
  • 21
  • 3

0 Answers0