ObservationDetail.DateTime
A date and time display component with flexible formatting options and fallback content support. Designed for healthcare observation timestamps with localization and conditional rendering capabilities.
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
A date and time display component with flexible formatting options and fallback content support. Designed for healthcare observation timestamps with localization and conditional rendering capabilities.
Basic Example
import { ObservationDetail } from "@ovok/native";
import * as React from "react";
const BasicTimestamp = () => (
<ObservationDetail.DateTime dateTime="2024-01-15T10:30:00Z" />
);
export default BasicTimestamp;Props
Every prop, with its type and description, is listed in the @ovok/native/observation-detail API reference.
Component Behavior
Date Formatting
- Uses
date-fnsfor reliable date formatting - Supports all date-fns format patterns
date-fns/formatthrows for an invalid date string; validate input before rendering- Provides localized date display
Conditional Rendering
- Shows formatted date when
dateTimeis provided - Renders
childrencontent whendateTimeis omitted. The fallback is returned as a bare fragment, so a plain string must be wrapped in a text component by the host; otherwise React Native can reject the raw string outside<Text>.
Last updated on
ObservationDetail.DataContainer
A themed card container component for grouping related observation data with consistent styling, shadows, and Material Design 3 theming. Provides structured presentation for healthcare information.
ObservationDetail
A scrollable container component designed for displaying healthcare observation data with automatic safe area handling and theme-based spacing. Serves as the main container for compound observation detail components.