title: TimePicker Razor ASP.NET-MVC
body: <p>I'm trying to create a TimePicker with Razor and JQueryUI in my bootstrap web. I created a DatePicker, and I know that I could create a DateTimePicker with JQuery, but I don't want to select the date and the time together, I want to select it with two different TextBox. </p>
  
  <p>So I saw many tutorials, but all of them create a DateTimePicker, and when I tried to create a TimePicker with the same format, that didn't worked for me.</p>
  
  <p>This is my code:</p>
  
  <p>JavaScript:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;link rel="stylesheet" href="https://code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css" type="text/css" /&gt;
  &lt;script src="http://code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.jquery.com/ui/1.11.3/jquery-ui.min.js"&gt;&lt;/script&gt;
  &lt;script language="javascript" type="text/javascript"&gt;
      $(document).ready(function () {
          $('#datepicker').datepicker({
              showOptions: { speed: 'fast' },
              changeMonth: false,
              changeYear: false,
              dateFormat: 'dd/mm/yy',
              gotoCurrent: true
          });
          $('#timepicker').timepicker();
      });  
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Razor and Html:</p>
  
  <pre><code>    @using (Html.BeginForm())
      {
          @Html.TextBox("date", DateTime.Now.ToShortDateString(), new { @id = "datepicker", @readonly = "readonly", @style = "width:250px;" })
          &lt;br /&gt;
          @Html.TextBox("time","-- Select Time --", new { @id = "timepicker", @readonly = "readonly", @style = "width:250px;" })
      }
  </code></pre>
  
  <p>Thanks! :)</p>