Navigation
Inputs & Forms
Selection
Containers & Overlays
Date / Time Input
Enters a date, a time or both, typed or picked from a calendar.
Overview
DateInput enters a date, a time or both, in different time zones. People type the value or pick it from the calendar behind the calendar button.
Date
Current state
- ISO (UTC):
2026-11-02T11:18:57.322Z - America/Los_Angeles:
Monday, November 2, 2026 at 3:18:57 AM PST - Browser local:
Monday, November 2, 2026 at 11:18:57 AM UTC
"use client";import React, {useState} from "react";import {DateInput} from "@brynlabs/fusion-ui";const TIMEZONE = "America/Los_Angeles";const formatInZone = (date: Date, timeZone?: string) =>date.toLocaleString("en-US", {dateStyle: "full", timeStyle: "long", timeZone});export const DateInputExample = () => {const [value, setValue] = useState<Date | undefined>(new Date());return (<div style={{display: "flex", flexDirection: "column", gap: "10px"}}><DateInputlabel={"Date"}type={"datetime"}timezone={TIMEZONE}value={value}onChange={setValue}></DateInput><div><strong>Current state</strong>{value ? (<ul><li>ISO (UTC): <code suppressHydrationWarning>{value.toISOString()}</code></li><li>{TIMEZONE}: <code suppressHydrationWarning>{formatInZone(value, TIMEZONE)}</code></li><li>Browser local: <code suppressHydrationWarning>{formatInZone(value)}</code></li></ul>) : (<p><code>undefined</code></p>)}</div></div>);};

