Skip to main content
/
/
/
FormatDate

FormatDate

Display a date based on locale

React
import FormatDate from "@intility/bifrost-react/FormatDate";
Props

Date formatting

Pass in a JS Date object to date prop, renders a bifrost-default formatted date, including a tooltip on hover where date includes month name, time includes timezone.

06/07/2026

Time or datetime

Include the time by setting show to "time" or "datetime":

Time: 14:42
Date and time: 06/07/2026 14:42

Locale

FormatDate follows current bifrost locale (default english). Use <Bifrost locale={nbNO}> in your app to use norwegian formatting.

Tooltip

Since some date formats can be ambiguous, we supply a tooltip on hover.

For show="date" we include a named month, and for show="time" we show 24h time and the time zone.

In certain circumstances it can be useful to display the time on tooltip even if show="date" (default), which you can get with the fullTooltip prop:

Date: 06/07/2026
Time: 14:42

If you don't want a tooltip, you can hide it with the noTooltip prop

Date: 06/07/2026
Time: 14:42

Custom format options

We recommend you always use the default format for consistency, but for special cases you can use the options prop which accepts Intl.DateTimeFormat options.

Make sure the show prop makes sense with the options you pass, or the tooltip (not customizable) might not. You can also override the current bifrost locale with locale prop, if necessary.

Date: 6 Jul 2026
Time: 2:42 pm
Date and time: 6 Jul 2026 2:42 pm