This sample shows how 'ambiguous' dates can be handled. An example of an ambiguous
date is 01 02 2006 which could be 1st February 2006 in English (United Kingdom)
or the 2nd of January 2006 in English (United States).
This sample shows how you could choose to handle an ambiguous date input. When a
date is input which could be interpreted as valid in either United Kingdom English
format or US English format, an event is raised. This displays a dialog box which
lets you select either the GB or US interpretation. Alternatively, both these options
can be rejected, instead returning you to the input box so you can change your input.
If either of the GB or US options is selected, the dialog box closes and the selected
date replaces the ambiguous input.
The following properties have been set:
- AllowApproximate has been set to “False” for date
- Default has been set to the current date and time
- DisplayDayOfWeek has been set to not include the day of the week
- Functionality is set to “Simple”
- Month/Years, Years, Null Indexes and Nulls are not allowed