Posted 15 November 2022, 9:38 am EST
I would like to be able to validate data within a cell that is set as DateCalendarCellType. First I want to say that i like the calendar pop-up and want to use that interface with the user without adding as mask editor. However, I would like to be able to ensure two types of validation:
1 - that the user has either selected a date or entered one via keyboard in mm/dd/yyyy format.
2 - that the date entered or selected was not greater than today’s date.
I am able to select a max and min value for an integer cell type and it validates perfectly, however I would like similar functionality for the DateCalendarCellType.
Do you have a code sample for how to achieve this? I have been looking through the forum and cannot find one.
My celltype is coded as follows:
****Dim dc As New FarPoint.Web.Spread.Extender.DateCalendarCellType() dc.Animated = True dc.DateFormat = "MM/dd/yyyy" dc.EnableOnClient = True dc.Validators.Add(cvValidateSpread) sv.Columns(9).CellType = dc**
**