In this article I will explain with an example, how to display Hijri (Islamic) calendar in ASP.Net MVC.
Download Bootstrap Hijri (Islamic) DatePicker Plugin
You will need to download the plugin files from the following location.
The complete documentation is available on the following page.
The Controller consists of two Action methods.
Action method for handling GET operation
Inside this Action method, simply the View is returned.
Action method for handling POST operation
This Action method gets called when the Form is submitted.
Inside this Action Method, the value of the selected date from the Hijri DatePicker is fetched and it set into a ViewBag object.
public class HomeController : Controller
    // GET: Home
    public ActionResult Index()
        return View();
    public ActionResult Index(string selectedDate)
        ViewBag.Message = selectedDate;
        return View();
The View consists of an HTML Form which has been created using the Html.BeginForm method with the following parameters.
ActionName – Name of the Action. In this case the name is Index.
ControllerName – Name of the Controller. In this case the name is Home.
FormMethod – It specifies the Form Method i.e. GET or POST. In this case it will be set to POST.
Inside the Form, there is a TextBox and a Submit Button.
Bootstrap Hijri DatePicker Plugin implementation
Inside the View, the following CSS files are inherited.
1. bootstrap.min.css
2. bootstrap-datetimepicker.min.css
And then, the following JS scripts are inherited.
1. jquery.min.js
2. moment.min.js
3. moment-hijri.js
4. bootstrap-hijri-datetimepicker.js
Inside the jQuery document ready event handler, the TextBox has been applied with the Bootstrap Hijri DatePicker plugin.
Submitting the Form
When the date is selected and the Submit button is clicked, the Form is submitted and the ViewBag object is checked for NULL and if it is not NULL then, the value of the ViewBag object is displayed using JavaScript Alert MessageBox.
    Layout = null;
<!DOCTYPE html>
    <meta name="viewport" content="width=device-width" />
    @using (Html.BeginForm("Index", "Home", FormMethod.Post))
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    @Html.TextBox("SelectedDate", "", new { @id = "txtHijriDate", @class = "form-control" })
                    <input type="submit" class="btn btn-primary" value="Submit"/>
    @if (ViewBag.Message != null)
        <script type="text/javascript">
            window.onload = function () {
    <link href="" rel="stylesheet" />
    <link href="" rel="stylesheet" />
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
    <script src="~/assets/js/bootstrap-hijri-datetimepicker.js"></script>
    <script type="text/javascript">
        $(function () {
How to display Hijri (Islamic) calendar (DatePicker) in ASP.Net MVC