27 lines
887 B
Plaintext
27 lines
887 B
Plaintext
@model DateTime?
|
|
@{
|
|
var attributes = ViewData["htmlAttributes"];
|
|
if (attributes == null)
|
|
{
|
|
if (ViewBag.Disabled == true)
|
|
{
|
|
attributes = new { @class = "form-control", @disabled = "disabled" };
|
|
}
|
|
else
|
|
{
|
|
attributes = new { @class = "form-control date" };
|
|
}
|
|
}
|
|
}
|
|
@if (ViewBag.Disabled == true)
|
|
{
|
|
<div class="input-group">
|
|
@Html.TextBox("", String.Format("{0:d}", (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty)), attributes)<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="input-group date datepicker">
|
|
@Html.TextBox("", String.Format("{0:d}", (Model.HasValue ? Model.Value.ToShortDateString() : string.Empty)), attributes)<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
</div>
|
|
} |