Version

CalcDefaultDateMask(IFormatProvider) Method

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

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.

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