s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Display and status

DateDisplay

DateDisplay - Formats and displays dates Supports various format options and relative time display.

Public export

typescript
import { DateDisplay } from '@happyvertical/smrt-ui/display';
Import path
@happyvertical/smrt-ui/display
Props
7
Props described
7 of 7
Bindable state
0
Callback events
0
Verified release
0.57.40

Props

NameTypeRequiredDescription
dateDate | string | number | null | undefinedYesDate to display (Date, ISO string, or timestamp)
format'short' | 'medium' | 'long' | 'relative'NoDisplay format
fallbackstringNoFallback text when date is null/undefined
showTimebooleanNoShow time along with date
localestringNoLocale for formatting (defaults to en-CA)
timeZonestringNoIANA zone for timestamps and relative calendar-day boundaries.
classstringNoOptional CSS class

Bindable state

This component has no bindable public state.

Callback events

This component declares no callback event props.

Examples and explanation