>Am evaluating the RCS Calendar Controls for an existing project...Wanted a VFP Control which would allow Multiple Selection of Dates...very much like what I see...
>
>I would like to be able to:
>
>1. Limit the Number of Dates which can be Selected (via Clicking)
>
>2. Disallow Selection of a Range of Dates (usually after a Specific Date)
>
>Invision a Message Box Popup when the User clicks on the Calendar when either the Number of Dates Selected surpasses a specific number or a Date is Greater than a Specific Date. The Date would not be Selected.
>
>Anyone know how this might be accomplished?
I know I answered you via e-mail, but I figured this might be helpful for someone else.
My suggestion was to look at the AddDates() method - you can intercept the click and allow/disallow date selection there. You can also just override the Click() on the label to do the same thing. I really should have delegated the code running in Click() up to a method and given it a better way of accepting/canceling the click. Maybe in future version.
The basic event sequence when you click on a date is:
- The Click() event on the label representing the date is fired
- The DateClick() method is called (on the container)
- The code in Click() continues
- Depending on its state it either calls RemoveDate() or AddDate()