Using jQuery, we have a very simple solution for this.
Add jQuery and CSS in the head tage and these two lines of JavaScript:
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.core.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.widget.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.tabs.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.datepicker.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$(".datepicker").datepicker();
});
</script>
Then in the form, you need to add the class to the text box:
<input type=textbox class=datepicker >