title: Date picker to pass on parameters MVC5
body: <p>Right, feels like a very noob questions but still new to all of this :) </p>
  
  <p>I have a class in a library that is supposed to generate a doc based on a few variables that should be passed on from the MVC5 web app.</p>
  
  <p>I looked at a couple of tutorials but I can't get my head around it so maybe I am approaching this the wrong way? </p>
  
  <p>This is my model: </p>
  
  <pre><code>      public class SummaryTicketsReportModel
          {
              public bool ServiceDesk { get; set; }
  
              [DisplayFormat(DataFormatString = "{0:DD/MM/YYYY", ApplyFormatInEditMode = true)]
              [DataType(DataType.Date)]
              [DisplayName("From")]
              public DateTime StartDate { get; set; }
  
              [DisplayFormat(DataFormatString = "{0:DD/MM/YYYY", ApplyFormatInEditMode = true)]
              [DataType(DataType.Date)]
              [DisplayName("From")]
              public DateTime EndDate { get; set; }
  
  
      //Do I need this?
              //public SummaryTicketsReportModel ()
              //{
              //   StartDate = new DateTime();
              //    EndDate = new DateTime();
              //}
  </code></pre>
  
  <p>This is my controller:</p>
  
  <pre><code>public class SummaryReportController : Controller
      {
          // GET: SummaryReport
          public ActionResult Index()
          {
  
              return View();
          }
  
          //POST Action
          [HttpPost]
          public ActionResult Index(SummaryTicketsReportModel serviceDesk, SummaryTicketsReportModel startDate, SummaryTicketsReportModel endDate)
          {
              // takes in the view model
              var selectedServiceDesk = serviceDesk;
              var selectedStartDate = startDate;
              var selectedEndDate = endDate;
              var generateReport = new TicketSummaryReport();
  //Needs to access the following: MonthSummaryReport ( ServiceDesk, StartDate, EndDate, summaryDocX) 
              //return generateReport.MonthsSummaryReport();
          }
      }
  </code></pre>
  
  <p>And this is my view: </p>
  
  <pre><code>@using System.Drawing
  @model SummaryTicketsReportModel
  
  @{
      ViewBag.Title = "TicketsSummaryReport";
  }
  
  
  &lt;h2&gt;TicketsSummaryReport&lt;/h2&gt;
  
  @using (Html.BeginForm())
  {
      &lt;tr&gt;
          &lt;td&gt;
              @Html.TextBox("", String.Format("{0:d}", Model.StartDate))
  
          &lt;/td&gt;
          &lt;td&gt;
              @Html.TextBox("", String.Format("{0:d}", Model.EndDate))
          &lt;/td&gt;
          &lt;td style="text-align: center"&gt;
              @Html.CheckBoxFor(model =&gt; model.ServiceDesk)
  
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;input type="submit"/&gt;
  }
  </code></pre>