Current filter:
                                You should refresh the page.
                                  • [C#]
                                    @(Html.DevExpress() .BootstrapFormLayout<EvaluationViewModel>("EvaluationForm") .ShowItemCaptionColon(false) .RequiredMarkDisplayMode(RequiredMarkMode.RequiredOnly) .Items(items => { items .AddGroup() .Caption("Trainee Evaluation") .Items(groupItems => { groupItems .AddItem(m => m.EvaluationDate) .ColSpanXl(5) .ColSpanLg(5) .ColSpanMd(4) .RequiredMarkDisplayMode(FieldRequiredMarkMode.Required) .Editor(config => config .DateEdit() .EditFormat(EditFormat.Date) .MaxDate(DateTime.Today) .MinDate(new DateTime(1970,1,1)) .ValidationSettings(settings => settings.ErrorDisplayMode(ErrorDisplayMode.ImageWithText)) .CalendarProperties(c => c.ShowWeekNumbers(false)) .DropDownButton(events => events.Visible(true)) .EditFormatString("MM/dd/yyyy") .UseMaskBehavior(true) .Caption(string.Empty) ); } } When the date is out of the range, the error message displays like this: "The date must be in the range 01/01/1970...09/11/2019." I would like to add more information to it. How can I overwrite this message? Thanks, Jinxiu

                                1 Solution

                                Creation Date Importance Sort by

                                Hello Jinxiu,

                                BootstrapDateEdit does not have a property that allows changing the range validation error message. However, you can change this text on the client side, just handle the Init event and use the following code:

                                [JavaScript]
                                function OnInit(s, e) { s.GetMainElement().querySelector(".dxbs-out-of-range-warn > label").innerText = "Test " + s.GetMinDate().toLocaleDateString() + " and " + s.GetMaxDate().toLocaleDateString(); }

                                Regards,
                                Vova

                                • Jinxiu Knoll 09.12.2019

                                  It works perfectly!

                                  Thank you!

                                • Vova (DevExpress Support) 09.12.2019

                                  Welcome!