---
title: SAIFWebDateTimeEdit null-date suppression
summary: Blanks sentinel "no date" values when the date field gains focus.
status: draft
owner: SAIF Documentation Team
last_reviewed: 2026-08-17
library: SAIF.Presentation.Web.Controls.Infragistics103
reference_type: package
operation_id: OP-DATEEDIT-INIT
trigger: ASP.NET Init event of the SAIFWebDateTimeEdit control
---

# SAIFWebDateTimeEdit null-date suppression

This operation runs during the `Init` phase of the ASP.NET page lifecycle for a `SAIFWebDateTimeEdit` control, registering a client script that blanks the field when it shows one of Infragistics' sentinel "no date" values on focus.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-DATEEDIT-INIT |
| **Trigger** | ASP.NET `Init` event of `SAIFWebDateTimeEdit` |
| **Inputs** | None beyond the control's own rendered text |
| **Outputs** | Registered client script `SDTE_Focus`, an `onfocus` attribute on the control |
| **Primary components** | `SAIFWebDateTimeEdit.SAIFWebDateTimeEdit_Init` |
| **Entry point** | SAIF.Presentation.Web.Controls.Infragistics103\SAIFWebDateTimeEdit.vb |

## Steps

1. Build inline JS function `SAIFWebDateTimeEdit_Focus(inEditId)` that looks up the Infragistics client-side edit object (`igedit_getById`), reads its `.text`, and if it equals the literal sentinel strings `"01/01/1901"` or `"12/31/9999"`, calls `oEdit.setValue(null)` to blank the field ([BR-1](../business-rules.md#br-1-sentinel-null-date-suppression-on-focus)).
2. Register the script under key `"SDTE_Focus"` if not already registered.
   - The registration is checked twice — the second check is redundant/dead-code-equivalent since the condition and body are identical to the first, but both are live code, not commented out.
3. Add an `onfocus` attribute to the rendered control invoking `SAIFWebDateTimeEdit_Focus('{ClientID}')`.

## Process flow

The following diagram visualizes this operation's control flow.

```mermaid
flowchart TD
	Start([Init event fires]) --> CheckReg{SDTE_Focus already registered?}
	CheckReg -->|No| Register[Register SAIFWebDateTimeEdit_Focus script]
	CheckReg -->|Yes| Attr
	Register --> Attr[Add onfocus attribute invoking function with ClientID]
	Attr --> EndOk([Init complete])
```

## Failure and edge-case behavior
- If the field's displayed text is not one of the two sentinel strings, the client script takes no action and the field's value is left unchanged.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- SAIF.Presentation.Web.Controls.Infragistics103\SAIFWebDateTimeEdit.vb
