SAIFWebDateTimeEdit¶
SAIFWebDateTimeEdit wraps the Infragistics WebDateTimeEdit control to prevent users from seeing Infragistics' internal sentinel "null date" representations (01/01/1901 and 12/31/9999) as if they were real entered data. It registers an onfocus client script that clears the field's value the moment either sentinel string is detected, so that a date field bound to an unset business date renders blank rather than a nonsensical historical or far-future date (BR-1).
Purpose¶
- Suppress the display of the two Infragistics sentinel "no date" values, converting them to a blank field the moment the user focuses it (BR-1).
Context¶
- Namespace:
SAIF.Presentation.Web.Controls.V2 - Assembly/package:
SAIF.BOF.Presentation.Web.Infragistics103(source bundled into this package)*
Public members¶
This control declares no additional public members beyond those inherited from its Infragistics base class; see Inherited public members below.
Private members¶
Members in this section are declared Private in SAIFWebDateTimeEdit.vb and are not part of the public API surface; they are documented here only to describe internal behavior relevant to consumers.
| Member | Signature | Purpose |
|---|---|---|
SAIFWebDateTimeEdit_Init |
Private Sub SAIFWebDateTimeEdit_Init(sender, e) Handles Me.Init |
Registers the SAIFWebDateTimeEdit_Focus client script and attaches it to the control's onfocus attribute; see SAIFWebDateTimeEdit null-date suppression. |
Inherited public members¶
Members in this section are inherited from Infragistics.WebUI.WebDataInput.WebDateTimeEdit, the Infragistics v10.3 vendor base class this control wraps.
| Member | Signature | Purpose |
|---|---|---|
Value |
Public Property Value As Object |
The bound date/time value of the edit control; the field this class's onfocus script blanks client-side when it equals a sentinel date. |
Text |
Public Overridable Property Text As String |
The displayed text representation of the control's value; compared client-side (via oEdit.text) against the literal sentinel strings "01/01/1901"/"12/31/9999" in SAIFWebDateTimeEdit_Focus. |
MinValue |
Public Property MinValue As Object |
The minimum allowed date value for the control; the Infragistics sentinel 01/01/1901 corresponds to this bound. |
MaxValue |
Public Property MaxValue As Object |
The maximum allowed date value for the control; the Infragistics sentinel 12/31/9999 corresponds to this bound. |
Attributes |
Public ReadOnly Property Attributes As AttributeCollection (from System.Web.UI.WebControls.WebControl) |
HTML attribute collection of the rendered control; SAIFWebDateTimeEdit_Init adds the onfocus attribute here to invoke the generated client script. |
ClientID |
Public ReadOnly Property ClientID As String (from System.Web.UI.Control) |
The rendered client-side element ID; passed into SAIFWebDateTimeEdit_Focus('{ClientID}') so the client script can look up the edit object via igedit_getById. |
Page |
Public Property Page As Page (from System.Web.UI.Control) |
The hosting page instance; used to call Page.ClientScript.RegisterClientScriptBlock for the SDTE_Focus script. |
Behavioral notes¶
- The script registration is guarded twice against duplicate registration under key
"SDTE_Focus"— the second guard is redundant with the first but both are live code, not dead/commented-out. - Sentinel comparison is against the literal displayed text strings
"01/01/1901"and"12/31/9999", not the underlying date value.
Constraints and usage notes¶
- Version-coupled to
Infragistics35.WebUI.WebDataInput.v10.3(version10.3.20103.2120). - Only affects the client-side displayed value on focus; does not alter the value posted back if the user never focuses the field.
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources¶
- SAIF.Presentation.Web.Controls.Infragistics103\SAIFWebDateTimeEdit.vb