Version

CalcDefaultDateMask(IFormatProvider,Boolean) Method

Calculates the default mask for date based on the specified format provider.
Syntax
'Declaration
 
Public Overloads Shared Function CalcDefaultDateMask( _
   ByVal formatProvider As IFormatProvider, _
   ByVal usePostfixSeparatorsFromLongDatePattern As Boolean _
) As String
public static string CalcDefaultDateMask( 
   IFormatProvider formatProvider,
   bool usePostfixSeparatorsFromLongDatePattern
)

Parameters

formatProvider
The format provider to use to get necessary format information to derive the mask from. Can be a CultureInfo or a DateTimeFormatInfo instance.
usePostfixSeparatorsFromLongDatePattern
This parameter indicates whether to use culture specific date separators that are composed of postfix symbols from the long date pattern of the culture's date-time format information.

Return Value

Mask as a string.
Remarks

Typically there is no need for you to directly call this method. If the ValueType is set to DateTime the XamMaskedInput and derived editors will call this method to calculate the mask if none has been explicitly set. Also if you want to explicitly set the mask to make use of culture sensitive date and time mask then use the following mask tokens when setting the Mask property:

  • {date} - Date mask based on short date pattern setting of the system.
  • {time} - Time mask based on short time pattern setting of the system. Short time pattern typically does not include seconds portion.
  • {longtime} - Time mask based on long time pattern setting of the system. Long time pattern typically includes seconds portion.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also