Hello all,
I'm using an 11.2 UltraDateTimeEditor with a MaskInput set to {time} to allow the user to enter a time (ex. 12:00 PM) for an "appointment" to start or end. I'd like to be limit the minimum time allowed to that user's shift time start, and to limit the maximum time allowed to that user's shift end. As far as I can tell, there are only properties for MinDate and MaxDate for the UltraDateTimeEditor, but since the "appointments" can be created on any day selected from the calendar, I'd like to be able to limit these UltraDateTimeEditor values to time frames rather than dates.
Is this functionality currently supported? If not, is there a way I can achieve this through code and events?
Thanks!
Melissa
Mike,
First off, thanks for the quick response. Checking the control's current DateTime was what I needed. Thanks so much!
Hi Melissa,
There is no Time data type in DotNet, so the control always deals with DateTime structs.
One thing you could do is set the MinDate and MaxDate to a DateTime using the current Date. Of course, that will be tricky if the date changes while your application is running. So you'd have to constantly keep checking for that.
Another option is to use the Validating event. In that event, you can just examine the time portion of the control's current DateTime.
Another option might be to use a TimeSpan instead of a DateTime. Then you could use UltraTimeSpanEditor.