Date Selector List Properties
The following properties are available for Date Selector List objects, grouped by the categories shown in the Selectors and Selector Lists editors.
Date Format
| Property | Type | Default | Description |
|---|---|---|---|
string |
DateSelectorList.DateDisplayTextFormatPatternDefault |
Specifies the pattern used to format the text displayed by the date selector tool to represent the selected date. The DateDisplayTextFormatPattern is a standard date format specifier as supported by the .NET framework. The standard date format specifiers consist of a single character. The following specifiers are the most commonly used for the DateDisplayTextFormatPattern: d - Short date pattern, which refers to the Regional Options Short Date format. D - Long date pattern, which refers to the Regional Options Long Date format. For a view that supports the CulturePolicy and CultureName settings, the DateDisplayTextFormatPattern value is interpreted based on the view’s culture. For instance, if the short date pattern is specified, then the date is formatted as M/d/yyyy for the en-US, English (United States) culture and as dd/MM/yyyy for the fr-FR, French (France) culture. For the long date pattern, the date is formatted as dddd, MMMM dd, yyyy for the en-US culture and dddd d MMMM yyyy for the fr-FR culture. Refer to http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.aspx for a complete list of the standard format patterns. |
|
string |
DateSelectorList.DateValueFormatPatternDefault |
Specifies the pattern used to format the value that represents the selected date. This setting controls the format of the date selector’s token value. The DateValueFormatPattern can be a standard pattern or a custom pattern as supported by the .NET framework. Note that the patterns are case-sensitive. The following includes some of the patterns that can be combined to construct a custom pattern. d - The day of the month. Single-digit days will not have a leading zero. dd - The day of the month. Single-digit days will have a leading zero. ddd - The abbreviated name of the day of the week dddd - The full name of the day of the week. M - The numeric month. Single-digit months will not have a leading zero. MM - The numeric month. Single-digit months will have a leading zero. MMM - The abbreviated name of the month. MMMM - The full name of the month. y - The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero. yy - The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero. yyyy - The year in four digits, including the century. Examples: d MMM yyyy, such as 9 May 2008 yyyy-MM-dd, such as 2008-05-09 Refer to http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo.aspx for a complete list of the standard and custom format patterns. Let’s say, for example, that you want to allow the user to specify a date range. You configure the view with a date selector to represent the start date and another to represent the end date. If the date/time entries in the database contain actual times, the start and end date values should be formatted to ensure that all entries within the date range are returned. The selector list used by the selector that represents the start date should be assigned a DateValueFormatPattern of yyyy-MM-dd 12:00:00. The selector list used by the selector that represents the end date should be assigned a DateValueFormatPattern of yyyy-MM-dd 23:59:59. See also: DateDisplayTextFormatPattern, TokenValueFormat |
Default Selection
| Property | Type | Default | Description |
|---|---|---|---|
DefaultPolicy |
DefaultPolicy.None |
Indicates how the default selection is determined. None - No item(s) is selected by default. LastUsedItem - The last item(s) used within the context is the default. The context is specified by the view’s SelectorLastUsedItemContext setting. FirstItem - The first item in the list is the default. AllItems - All items in the list are automatically selected. This option only applies when multiple selections are allowed. SpecifiedString - The DefaultSelectionString value, which can be tokenized, is the default. Today - Today’s date. This option only applies to Date selectors and Generic selectors that use the SelectorComboBox SelectorControlObjectTypeID. |
|
DefaultSelectionStringCurrentCulture |
string |
The date string used as the default selection when the DefaultSelectionPolicy is SpecifiedString. Enter the date string using a format that is appropriate for the locale of the regional format settings of your Windows operating system. For example, if the locale is English (United States), then specify the last day of 2011 as 12/31/2011. If the locale is French (France), specify the same day as 31/12/2011. When the selector list is used by a date selector in a view, the format used to present the date is based on the view’s culture and the DateDisplayTextFormatPattern setting. The string can be tokenized. The format of the date string assigned to the token must be yyyy-MM-dd, such as 2011-10-15. The DefaultSelectionString is only applicable when the DefaultSelectionPolicy is set to SpecifiedString. |
|
string |
The string that represents the date used as the default when the DefaultSelectionPolicy is LastUsedItem and no last used item exists. Refer to the DefaultSelectionString for information about formatting the date string. |
Null Selection
| Property | Type | Default | Description |
|---|---|---|---|
string |
The text displayed by the selector when no item(s) is selected. The setting is often used to display a prompt. The value can be tokenized. |
||
string |
The text assigned to the token when no item(s) is selected. NullSelectionTokenValue is typically used to specify the token value for a selector that is configured as optional, but still needs to be represented by a token. |
Token Value
| Property | Type | Default | Description |
|---|---|---|---|
string |
The format used to create the text that is assigned to the token. By default, the text assigned to the token is date value string that is formatted based on the DateValueFormatPattern. If the token value needs to contain additional text prepended and/or appended to the text representing the selected date, you can use the TokenValueFormat to specify the text. The format must contain the format item {0}, which is replaced with the formatted date value string. |
||
bool |
false |
Controls whether a single quotation mark within the token item value is automatically escaped with another single quote. For example, if TokenValueItemEscapeSingleQuote is True and the selected item is Ville De’anjou, the item value assigned to the token is Ville De''anjou. This setting is intended for use when the token is used within a relational query. |
|
string |
When the user is allowed to select multiple items, the token value is a delimited list of substrings in which each substring represents a selected item. If each substring needs to be prepended and/or appended with additional text, you can use the TokenValueItemFormat to specify the text. The format must contain the format item {0}, which is replaced with the selected item string. For example, to enclose each item string in single quotes, the TokenValueItemFormat can be set to '{0}' See also: TokenValueDelimiter, TokenValueFormat |