c# - Date-picker is not working in MVC -


i using jquery 2.1.0 , been called in _layouy.cshtml page @scripts.render("~/bundles/jquery") trying add datepicker view getting error 0x800a01b6 - javascript runtime error: object doesn't support property or method 'datepicker'. jquery 2.1.0 predownloded when created new project under script folder there no jquery-ui folder. can problem? view:

@model movie.models.moviemodel  @{ viewbag.title = "add"; layout = "~/views/shared/_layout.cshtml"; @scripts.render("~/bundles/jquery-ui"); }   <h2></h2>  @using (html.beginform()) { @html.antiforgerytoken()  <div class="form-horizontal">     <h4>moviemodel</h4>     <hr />      @html.validationsummary(true)         <div class="form-group">         @html.labelfor(model => model.dob, new { @id = "news_date", @class = "control-      label col-md-2" })         <div class="col-md-10">             <p>date:<input type="text" id="dob" class="datefield" /></p>             @html.editorfor(model => model.dob)             @html.validationmessagefor(model => model.dob)         </div>     </div>  @section scripts { @scripts.render("~/bundles/jqueryval")  }  <script>  $(document).ready(function () {     $("#news_date").datepicker("option", "datepickeroptions", { firstday: 1 });     $("#news_date").datepicker({ dateformat: 'dd/mm/yy' }); }); 

add jquery ui view.

@scripts.render("<your_jqueryui_path>") 

in scripts section.

or atleast datepicker


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -