Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
885
Behaviour Of UltraDateTimeEditor With Min and Max
posted

I have a DateTimeEditor being used as the editor on a grid cell. The editor is masked with '{LOC} hh:mm tt' to restrict entries to time values only.

The grid is a detail grid and the master record has a date and time span associated with it. Detail records must have a start and stop time within the master record's span.

I am initializing the date (and time) when a row is added with the latest date time entered to date. So the first new row gets the start of the master records span, and subsequent records get the latest time already entered in the detail grid. This part is all fine.

The user can edit the values in the start and end time cells, though, so I need to do some validation to keep them in the range. I've tried setting the MinDate and MaxDate properties on the DateTimeEditor but it's resulting in some weird behaviour.

e.g. My range is 6/6/12 8:00 AM to 6/6/12 8:00 PM. User starts a row and gets 8:00 AM as start and end time, and is placed on end time cell to edit.

Placing the caret in the hours part of the time and pressing up/down cycles the hours between 8 and 20. This I suppose makes sense for a 24 hour time format, except I'm not using one. The user, though, can cycle to '17:00 PM' which makes no sense.

It gets worse, though. When the Min/Max is set to 6/06/12 8:00:00 PM to 6/07/12 8:00:00 AM then the hours still cycle between 8 and 20. The user can't get to '7:30 AM' - and if they TYPE 7:30 AM they get the message that 'the input value does not satisfy maximum value constraint'.

I read the post http://forums.infragistics.com/forums/p/31739/173953.aspx#173953 and it seems related, but it's nearly three years old.

Can I fix this by applying some other property, or is this a bug?