Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
145 Points
85 Posts
Apr 06, 2012 09:27 PM|LINK
Add a reference to jquery.js and the jquery css file in your view/_layout and for the textbox:
@Html.TextBox(x => x.Something, new { @class = "date" })
EDIT: Forgot about the little snippet of JS needed to make this work
<script> $(document).ready(function () { $('.date').datepicker({ dateFormat: "mm/dd/yy" }); }); </script>
imauld
Member
145 Points
85 Posts
Re: How to add calendar extender for textbox in mvc3
Apr 06, 2012 09:27 PM|LINK
Add a reference to jquery.js and the jquery css file in your view/_layout and for the textbox:
@Html.TextBox(x => x.Something, new { @class = "date" })EDIT: Forgot about the little snippet of JS needed to make this work
<script> $(document).ready(function () { $('.date').datepicker({ dateFormat: "mm/dd/yy" }); }); </script>