#198: Getting rid of buggy jquery driven placeholder text in favor of browser supported placeholder attribute.

This commit is contained in:
Sipke Schoorstra
2014-07-23 23:31:17 -07:00
parent 29b45d6e45
commit bc13e3671a
2 changed files with 4 additions and 5 deletions

View File

@@ -6,12 +6,12 @@
@if (Model.ShowDate) {
<label class="forpicker" for="@Html.FieldIdFor(m => Model.Date)">@T("Date")</label>
<span class="date">@Html.EditorFor(m => m.Date)</span>
<span class="date">@Html.TextBoxFor(m => m.Date, new { placeholder = T("Date").Text })</span>
}
@if (Model.ShowTime) {
<label class="forpicker" for="@Html.FieldIdFor(m => Model.Time)">@T("Time")</label>
<span class="time">@Html.EditorFor(m => m.Time)</span>
<span class="time">@Html.TextBoxFor(m => m.Time, new { placeholder = T("Time").Text })</span>
}
@if (Model.ShowDate) { <text>@Html.ValidationMessageFor(m => m.Date)</text> }

View File

@@ -9,17 +9,16 @@
Script.Require("jQueryCalendars_All").AtFoot();
Script.Require("jQueryCalendars_Picker_Ext").AtFoot();
Script.Require("jQueryTimeEntry").AtFoot();
Script.Require("jQueryDateTimeEditor").AtFoot();
}
@if (Model.ShowDate) {
<label class="forpicker" for="@Html.FieldIdFor(m => Model.Date)">@T("Date")</label>
<span class="date">@Html.EditorFor(m => m.Date)</span>
<span class="date">@Html.TextBoxFor(m => m.Date, new { placeholder = T("Date").Text, @class = "text" })</span>
}
@if (Model.ShowTime) {
<label class="forpicker" for="@Html.FieldIdFor(m => Model.Time)">@T("Time")</label>
<span class="time">@Html.EditorFor(m => m.Time)</span>
<span class="time">@Html.TextBoxFor(m => m.Time, new { placeholder = T("Time").Text, @class = "text" })</span>
}
@if (Model.ShowDate) { <text>@Html.ValidationMessageFor(m => m.Date)</text> }