Components

Rate this page:

This page describes a Forge preview feature. Preview features are deemed stable; however, they remain under active development and may be subject to shorter deprecation windows. Preview features are suitable for early adopters in production environments.

We release preview features so partners and developers can study, test, and integrate them prior to General Availability (GA). For more information, see Forge release phases: EAP, Preview, and GA.

DateLozenge

To add the DateLozenge component to your app:

1
2
import { Text, DateLozenge } from '@forge/react';

Description

An inline component that displays a calendar date.

You can only use this component as a child element with Text as the parent component.

Props

NameTypeRequiredDescription
valuenumberYesThe date represented as the number of milliseconds elapsed since Unix epoch.

Example

A text component with a nested DateLozenge component.

1
2
<DateLozenge value={new Date('2023/09/07').getTime()} />

Output

Example image of rendered date

Rate this page: