Run a method in controller according to datepicker value
问题 I want run the method Index in the Home Controller according to the date selected in datepicker, Here is my View code: <input type="text" name="date" class="datepicker" id="calendar" /> $("#calendar").datepicker({ dateFormat: 'dd-mm-yy', onSelect: function (date, instance) { $.ajax({ type: "GET", url: '@Url.Action("Index","Home")/' + date, success: function (data) { if (data.success) { alert(date) } } }) } }).datepicker("setDate", new Date()); I want when I choose a date in my datepicker run