Note that there are some explanatory texts on larger screens.

plurals
  1. POEasy way to implement Date/Time picker
    text
    copied!<p>Anyone know what the easiest way to implement a date/time picker in bootstrap/razor html code is? I currently have the program running fine by entering directly as:</p> <pre><code> &lt;div class="editor-label"&gt; @Html.LabelFor(model =&gt; model.date) &lt;/div&gt; &lt;div class="editor-field"&gt; @Html.EditorFor(model =&gt; model.date) @Html.ValidationMessageFor(model =&gt; model.date) &lt;/div&gt; </code></pre> <p>But would love a date/time picker to popup when date is selected? Any suggestions?</p> <p>Simplicity is key here as the code is for some basic students to see.</p> <p>EDITED but not working:</p> <p>My new head, still not working:</p> <pre><code>&lt;meta charset="utf-8"&gt; &lt;title&gt;App Title&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;meta name="description" content=""&gt; &lt;meta name="author" content=""&gt; &lt;link href="@Url.Content("~/Content/bootstrap/css/bootstrap.css")" rel="stylesheet"&gt; &lt;link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /&gt; &lt;script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="@Url.Content("~/Content/bootstrap/js/bootstrap.min.js")" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $("#date").datepicker(); }); &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload