I am building an Asp.net MVC app and would like to add a datepicker.
I have this code in my form in the view
@Html.LabelFor(b => b.Date)
@Html.EditorFor(b => b.Date, new {id = "news_date"})
and I would like to add this javascript to it to enable to datapicker:
$(document).ready(function () {
$("#news_date").datepicker({ dateFormat: 'dd/mm/yy' });
});
however when the application is run it shows the above code as text on the page. How do I get it to recognize it as javascript?