Thursday, May 26, 2016

Disable previous dates in devexpress mvc DateEdit


<script type="text/javascript">
    function UpdateInfo() {

        var daysTotal = EFFECTIVE_DATE_TO.GetRangeDayCount();
    }

</script>

    @Html.DevExpress().DateEdit(
    settings =>
     {
      settings.Name = "EFFECTIVE_DATE_TO";
      settings.Properties.ClientInstanceName = "EFFECTIVE_DATE_TO";
      settings.Properties.EditFormat = EditFormat.Custom;
      settings.Properties.EditFormatString = "MM/dd/yyyy";
      settings.Properties.ClientSideEvents.DateChanged = "UpdateInfo";
      settings.Properties.DateRangeSettings.StartDateEditID = "EFFECTIVE_DATE_FROM";
      settings.Properties.ValidationSettings.SetFocusOnError = true;
      settings.Properties.ValidationSettings.Display = Display.Dynamic;
      settings.Properties.ValidationSettings.EnableCustomValidation = true;
     }
    ).Bind(Model.EFFECTIVE_DATE_TO).GetHtml()
                                 

No comments:

Post a Comment

Comments

Search

Custom Search
Protected by Copyscape Plagiarism Software