Add vehicle active/inactive state
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
@model DateTime
|
||||
@model DateTime?
|
||||
@{
|
||||
Layout = "~/Views/Shared/EditorTemplates/_FieldLayout.cshtml";
|
||||
var inputSize = (string)ViewData.ModelMetadata.AdditionalValues["InputSize"];
|
||||
var val =
|
||||
Model.HasValue
|
||||
? Model.Value.ToShortDateString()
|
||||
: string.Empty;
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(inputSize))
|
||||
{
|
||||
@Html.TextBox("", (Model != DateTime.MinValue ? Model.ToShortDateString() : string.Empty ), new { @class = inputSize})
|
||||
@Html.TextBox("", (Model != DateTime.MinValue ? val : string.Empty ), new { @class = inputSize})
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.TextBox("", (Model != DateTime.MinValue ? Model.ToShortDateString() : string.Empty ))
|
||||
@Html.TextBox("", (Model != DateTime.MinValue ? val : string.Empty ))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user