MDK Logo
ReferenceUI KitReactUI Kit foundationComponentsFilters

TimeframeControls

Date-range picker for financial reporting pages — supports year, month, and week granularity via connected selects.

Date-range picker for financial reporting pages — supports year, month, and week granularity via connected selects.

import { TimeframeControls } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
hintOptionalstring
onResetOptionalVoidFunction
showResetButtonOptionalboolean
isWeekSelectVisibleOptionalboolean
isMonthSelectVisibleOptionalboolean
layoutOptional"horizontal" | "stacked"
dateRangeOptionalTimeframeControlsDateRange
timeframeTypeOptionalTimeframeTypeValue | null
onRangeChangeOptionalTimeframeControlsOnRangeChange
onTimeframeTypeChangeOptional(type: TimeframeTypeValue) => void

Usage

Controls for selecting a reporting time frame: year, month, and optional week picker.

ComponentDescription
TimeframeControlsFull time-frame picker: year, month, and optional week selection in horizontal or vertical layout.
TimeframeWeekTreeContentHierarchical year → month → week tree used inside TimeframeControls.

TimeframeControls Props

PropTypeRequiredDefaultDescription
hintstringnoHelper text below the controls.
dateRangeDateRangenoCurrent date range.
isMonthSelectVisiblebooleannotrueShow month selector.
isWeekSelectVisiblebooleannotrueShow week selector.
onRangeChange(range) => voidnoCalled when the range changes.
timeframeTypestringnoActive timeframe type.
onTimeframeTypeChange(type) => voidnoCalled when timeframe type changes.
layout"horizontal" | "vertical"no"horizontal"Layout direction.

Examples

import { TimeframeWeekTreeContent } from '@tetherto/mdk-react-devkit'export const TimeframeWeekTreeContentExample = () => (  <div className="mdk-example-row">    <TimeframeWeekTreeContent timezone="UTC" selectedYear={2026} selectedMonth={4} />  </div>)
import { TimeframeControls } from '@tetherto/mdk-react-devkit'export const TimeframeControlsExample = () => (  <div className="mdk-example-row">    <TimeframeControls      onRangeChange={(range) => console.warn('range changed', range)}      layout="horizontal"    />  </div>)