Hello,
In my Webforms app, in Refernce I have JuiceUI. In my aspx, I can find <juice:.....> elements. I am trying to associate a TextBox with JuiceUI DatePicker. This is my aspx code :
<juice:Datepicker runat="server" ID="juiceInqDtPkr" TargetControlID="inqDtPickerTxt" MaxDate="0" DateFormat="d M yy" DefaultDate="0" /> <asp:TextBox ID="inqDtPickerTxt" runat="server" TextMode="Date" CssClass="form-control"></asp:TextBox>
The error that I get is :
Unhandled exception at line 138, column 2 in http://localhost:19715/Scripts/juice.js 0x800a138f - JavaScript runtime error: Unable to get property '_attachDatepicker' of undefined or null reference
In my Scripts folder, I have juice.js & juice.min.js. In my Master file :
<asp:ScriptManager runat="server">
<Scripts>
<%--To learn more about bundling scripts in ScriptManager see http://go.microsoft.com/fwlink/?LinkID=301884 --%>
<%--Framework Scripts--%>
<asp:ScriptReference Name="MsAjaxBundle" />
<asp:ScriptReference Name="jquery" Path="~/Scripts/jquery-1.10.2.js" />
<asp:ScriptReference Path="~/Scripts/jquery-ui-1.11.4.js" />
<asp:ScriptReference Name="wijmo" Path="~/Scripts/jquery.wijmo-open.all.2.4.1.min.js" />
<asp:ScriptReference Name="bootstrap" />
<asp:ScriptReference Name="respond" />
<asp:ScriptReference Name="WebForms.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebForms.js" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebUIValidation.js" />
<asp:ScriptReference Name="MenuStandards.js" Assembly="System.Web" Path="~/Scripts/WebForms/MenuStandards.js" />
<asp:ScriptReference Name="GridView.js" Assembly="System.Web" Path="~/Scripts/WebForms/GridView.js" />
<asp:ScriptReference Name="DetailsView.js" Assembly="System.Web" Path="~/Scripts/WebForms/DetailsView.js" />
<asp:ScriptReference Name="TreeView.js" Assembly="System.Web" Path="~/Scripts/WebForms/TreeView.js" />
<asp:ScriptReference Name="WebParts.js" Assembly="System.Web" Path="~/Scripts/WebForms/WebParts.js" />
<asp:ScriptReference Name="Focus.js" Assembly="System.Web" Path="~/Scripts/WebForms/Focus.js" />
<asp:ScriptReference Name="WebFormsBundle" />
<%--Site Scripts--%>
</Scripts>
</asp:ScriptManager>
Even in my web.config file under <system.web> tag, I have :
<pages> <controls> <add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" /> <add assembly="JuiceUI" namespace="Juice" tagPrefix="juice" /> </controls> </pages>
I don't think I have missed out anything for the JuiceUI to execute properly. You can see in ScriptManager, I have tried to add juice over there also. But in any ways, I get no success.
I couldn't find any cause for this error. Any idea why is this error causing & how to solve it !!! Even I googled this error, but couldn't get any productive help.
Any help is highly appreciated.
Thanks