Hi malar,
Check this example. Now please take its reference and correct your code.
Model
public class Project
{
public string PROJECTFROMDATE { get; set; }
public string PROJECTFROMDATE1 { get; set; }
}
Controller
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
Project project = new Project();
return View(project);
}
}
View
@model Datepicker_Model_MVC.Models.Project
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
$(document).ready(function () {
$(".getdate").each(function () {
$(this).datepicker();
});
});
</script>
</head>
<body>
@Html.TextBoxFor(m => m.PROJECTFROMDATE, new { @id = "txtPROJECTFROMDATE", @class = "getdate" })
@Html.TextBoxFor(m => m.PROJECTFROMDATE1, new { @id = "txtPROJECTFROMDATE1", @class = "getdate" })
</body>
</html>
Screenshot