Version

AutoFillDate Property

Specifies whether to auto-fill empty date components when the user attempts to leave the editor. The default is None.
Syntax
'Declaration
 
Public Property AutoFillDate As AutoFillDate
public AutoFillDate AutoFillDate {get; set;}
Remarks

If the user types in an incomplete date then the editor will consider the input invalid and take appropriate actions based on the InvalidValueBehavior property setting. AutoFillDate lets you specify that such partial date inputs be auto-filled using the current date.

If you set the AutoFillDate to Year then the user will be required to enter both the month and the day. The year if left blank will be filled in with the current year. If AutoFillDate is set to MonthAndYear then the user will be required to enter the day. The month and year if left blank will be filled in with the current month and the current year respectively.

Example
The following code creates a XamDateTimEditor and sets its AutoFillDate to Year. This will cause the editor to automatically fill the year with the current if the user leaves it blank when the focus is shifted from the editor. For example, if the user enters 1 in month part and 2 in day part and leaves the year part blank. Upon leaving the editor (giving focus to some other control on the form), the editor will automatically fill the year with the current year. This lets the user enter dates from current year conveniently.

<igEditors:XamDateTimeEditor x:Name="dateEditor1" Mask="{}{date}" AutoFillDate="Year" />
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