DateField

A date input field that uses the browser’s native type="date" picker. The value is a nullable DateTime, returning null when no date has been selected.

Basic Usage

<ArcadiaForm Model="model">
    <DateField Field="@nameof(Model.BirthDate)" Label="Date of Birth" />
</ArcadiaForm>

Parameters

ParameterTypeDefaultDescription
ValueDateTime?nullThe selected date. Null when no date has been chosen. Supports two-way binding.
ValueChangedEventCallback<DateTime?>Callback invoked when the user picks or clears a date.

Inherited from FieldBase

ParameterTypeDefaultDescription
Labelstring?nullVisible label displayed above the field.
HelperTextstring?nullHelper text displayed below the field.
RequiredboolfalseWhether the field is required.
DisabledboolfalseWhether the field is disabled.
ReadOnlyboolfalseWhether the field is read-only.
ErrorsIReadOnlyList<string>?nullValidation errors to display.
SchemaFieldSchema?nullField schema definition for dynamic form generation.

Validation

public class PersonModel
{
    [Required(ErrorMessage = "Date of birth is required.")]
    public DateTime? BirthDate { get; set; }
}

Accessibility

  • Label is linked to the input via for/id attributes.
  • Required fields set aria-required="true" and display a visual * indicator.
  • Validation errors are linked via aria-describedby and announced with role="alert".
  • The browser’s native date picker provides built-in keyboard and assistive technology support.