<appSettings> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> </appSettings> |
[In _Layout.html] <body> @RenderBody()
@RenderSection("scripts", required: false) @(Html.EJ().ScriptManager()) |
@Html.EJ().DatePicker("MyFirstDatePicker")it's only showing one text box not date picker like this
<input data-role="ejdatepicker" id="MyFirstDatePicker">But using javascript it's working fine like this
<script type="text/javascript"> $(function () { $("#datepick").ejDatePicker({width:"100%"}); }); </script>and output is
<span class="e-datewidget e-widget" style="width: 100%;" aria-invalid="false"> <span class="e-in-wrap e-box e-padding"> <input type="text" id="datepick" class="e-datepicker e-js e-input" tabindex="0" aria-atomic="true" aria-live="assertive" name="datepick" placeholder="Select date"> <span id="datepick-img" class="e-select" style="display: block;"> <span class="e-icon e-date" aria-label="Select"></span> </span> </span> </span>
<link rel='nofollow' href="~/Modules/Styles/web/default-theme/ej.widgets.all.min.css" rel="stylesheet" />
<script src="~/Modules/Scripts/jquery-1.10.2.min.js"></script> <script src="~/Modules/Scripts/jsrender.min.js"></script> <script src="~/Modules/Scripts/jquery.globalize.min.js"></script> <script src="~/ModulesScripts/jquery.easing.1.3.min.js"></script> <script src="~/Modules/Scripts/ej/ej.web.all.min.js"></script>And this is my web.config settings
<appSettings> <add key="UnobtrusiveJavaScriptEnabled" value="true" /> </appSettings>
<system.web.webPages.razor> <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage"> <namespaces> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Web.WebPages" /> <add namespace="System.Linq"/> <add namespace="System.Collections.Generic"/> <add namespace="Orchard.Mvc.Html"/> <add namespace="Syncfusion.JavaScript" /> <add namespace="Syncfusion.JavaScript.DataVisualization" /> <add namespace="Syncfusion.MVC.EJ" /> </namespaces> </pages> </system.web.webPages.razor> <system.web> <compilation targetFramework="4.5.1"> <assemblies> <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> <add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> <add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> <add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/> <add assembly="Syncfusion.EJ.Export, Version=13.3450.0.7, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /> <add assembly="Syncfusion.Compression.Base, Version=13.3450.0.7, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /> <add assembly="Syncfusion.EJ, Version=13.3450.0.7, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /> <add assembly="Syncfusion.EJ.Mvc, Version=13.3500.0.7, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /> <add assembly="Syncfusion.Linq.Base, Version=13.3450.0.7, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /> <add assembly="Syncfusion.XlsIO.Base, Version=13.3450.0.7, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /> <add assembly="Syncfusion.EJ.Olap,Version=13.3450.0.7, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /> <add assembly="Syncfusion.Olap.Base, Version=13.3450.0.7, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" /> </assemblies> </compilation> </system.web>