Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
895
Set WebMonthCalendar or WebDatePicker selection to only allow for 30 days.
posted

I only want the user to be able to select a maximum of 30 days.  How do I limit that using a WebMonthCalendar or  WebDatePicker?

  • 7495
    Suggested Answer
    Offline posted

    Hi Abby,
    Thank you for contacting Infragistics!
    We received your support request concerning allowing user to select maximum 30 days using WebMonthCalendar and WebDatePicker,
    for this you can create the minimum and maximum value of datetime object and assign to the WebMonthCalendar as:
          DateTime minDate = DateTime.Today;
          DateTime maxDate = DateTime.Today.AddDays(30);
               
          WebMonthCalendar1.MinDate = minDate;
          WebMonthCalendar1.MaxDate = maxDate;
    You can find more information here:https://ko.infragistics.com/help/aspnet/webmonthcalendar-setting-min-and-max-dates-for-webmonthcalendar
    Please let me know if you need more information.
    Sincerely,
    Divya Jain
    Associate Software Developer
    Infragistics, Inc.
    www.infragistics.com