@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) {