Props

PropTypeデフォルト説明
value{ start: Date | null; end: Date | null }選択された日時範囲の値
onChange(value: { start: Date | null; end: Date | null }) => void値が変更されたときのコールバック
timeTimeConfigタイムパネルの設定(開始と終了の両方に適用)
presetsDateRangePreset[]事前定義された日付範囲のプリセット
maxDaysnumber範囲内で許可される最大日数(その日を含む)
minDaysnumber範囲内で必要な最小日数(その日を含む)
allowSingleDateInRangebooleantrue開始日と終了日が同じ範囲を許可
minDateDate選択可能な最小日付
maxDateDate選択可能な最大日付
localePartial<Locale>カスタムロケールの設定
initialMonthDate初期表示月
size"small" | "medium" | "large" | "x-large""medium"コンポーネントのサイズ
weekStartsOnWeekDay"sunday"週の最初の日
isDateUnavailable(date: Date) => boolean日付を無効としてマーク
displayFormatstringカスタム表示フォーマット
openboolean制御されたオープン状態
initialOpenboolean初期オープン状態(非制御)
onOpenChange(open: boolean) => voidオープン状態が変更されたときのコールバック
requiredbooleanfalse値のクリアを無効化
showOutsideDaysbooleanfalse隣接する月の日付を表示
highlightDatesDate[]ハイライトする日付
shouldCloseOnSelectbooleanfalseプリセットクリック時に自動確定
numberOfMonthsnumber2表示する月数
captionLayout"buttons" | "dropdown""buttons"キャプションのナビゲーションスタイル
fromYearnumberドロップダウンの開始年
toYearnumberドロップダウンの終了年
disablePastbooleanfalse今日より前の日付を無効化
disableFuturebooleanfalse今日より後の日付を無効化
inlinebooleanfalseカレンダーをインラインで表示(ポップアップなし)
namestringフォーム送信用の非表示inputの名前(開始日時)
endNamestring終了日時用の非表示inputの名前(デフォルトは name-end
placeholderstringトリガーのプレースホルダーテキスト
hideHeaderbooleanfalseナビゲーションヘッダーを非表示
hideFooterbooleanfalseアクションフッターを非表示

TimeConfig

interface TimeConfig {
/** Time display precision. Defaults to "minute". */
precision?: "hour" | "minute" | "second";
/** 12-hour or 24-hour format. Defaults to "24". */
hourFormat?: "12" | "24";
/** Minute increment step. Defaults to 5. */
minuteStep?: 1 | 2 | 3 | 5 | 10 | 15 | 20 | 30;
/** Second increment step. Defaults to 1. */
secondStep?: 1 | 2 | 3 | 5 | 10 | 15 | 20 | 30;
/** Height (in px) of each scroll wheel item. Defaults to 32. */
itemHeight?: number;
}

DateRangePreset

interface DateRangePreset {
label: string;
value: { start: Date; end: Date } | (() => { start: Date; end: Date });
}