1 Reply Latest reply on Dec 18, 2008 4:58 AM by Ilya Shaikovsky

    To Disable past dates in calender control

    Shahbaz Ali Newbie

      I need to disable past dates in rich:calender control. I have used CalendarDataModel and CalendarDataModelItem, this works fine for the current month but does not effect the past month dates when move to previous months, or is there any other way to doing this? any suggestions?

        • 1. Re: To Disable past dates in calender control
          Ilya Shaikovsky Master

          You could disable some dates even on client side.
          isDayEnabled attribute could be pointed to some js function which will get the date as a parameter and return boolean value which means if day enabled. This function called by the calendar during dates initialization for every date from the month.

          Switching monthes back - could be optionally turned off at all while you at current month using cancelable event oncurrentdatechange.

          If you stil want to use model - just check your values in debug after switching month back. Seems there are just wrong disabled property value for the dates before current month.