Hi,
Use a field of the CalendarField type.
First, let's show a user what dates are prohibited to be chosen.
In the DateOnPeriodOutput handler:
Code |
---|
Procedure DateOnPeriodOutput(Item, PeriodAppearance)
ArrayOfProhibitedDates = ProhibitedDates(); // this is your procedure where you prepare
// a narray of prohibited dates
For each SelDate In PeriodAppearance.Dates Do
If Not ArrayOfProhibitedDates.Find(SelDate.Date) = Undefind Then
SelDate.BackColor = WebColors.Coral; //any color you like
EndIf;
EndDo;
EndProcedure
|
Once a user select a date, check whether the date is allowed to be chosen.
And one more important step:
Before you post the document, check the selected date again on server, because the is a way for user to pass all checks on the form.