Ant Design Svelte

TimePicker / TimeRangePicker

Time and intervals with formats, steps and confirmation.

When to use

TimePicker selects time through an input field and columns of hours, minutes and seconds. TimeRangePicker specifies the beginning and end of the interval in the general panel. For a calendar date along with time, use DatePicker with showTime.

The standard TimePicker and TimeRangePicker use Dayjs. Your application chooses the date and time zone to store alongside the selected time.

Meaning and confirmation

The value of a single field is Dayjs | null. For control, pass value and assign the result of onChange to the Svelte state. defaultValue specifies only the initial local time. Guided Example changes the model by input and external button.

Problem Setting Example
Set start time defaultValue Base time
Control the model from the outside value, onChange Managed time
Compare confirmation and application without OK needConfirm Time confirmation
Change the time by scrolling the column changeOnScroll Change by scroll
Enter hours, minutes and milliseconds A format object with type: 'mask' Time input mask
Save Dayjs to Form form.setFieldValue Time in Form

By default needConfirm=true: selecting a column changes the draft, OK publishes the value. onCalendarChange reports the intermediate time, onChange reports the accepted result. For a single field, the third argument to onCalendarChange is an empty object; the range context refers to a range. When clearing a single field completely, both value and the string argument to onChange are null.

needConfirm=false allows use without a separate button. Don't use text change as a replacement for onChange: previewValue=hover temporarily shows the time under the pointer without calling onChange or onCalendarChange. false disables preview.

defaultOpenValue sets the initial panel candidate and OK, leaving the field itself empty until selected. changeOnScroll selects the closest allowed bit after manual scrolling; the confirmation rule is preserved. Scrolling example combines it with needConfirm=false.

OK sends the draft to onOk before calling onChange and requesting closure. The order stays the same when the app accepts the new value or closes the panel in onOk. For a range, onChange publishes the changed pair after the available endpoints are confirmed.

In multiple mode, TimePicker takes an array of Dayjs dates in value. Its onChange supplies arrays of times and strings. Clearing the field returns null in both arguments. The multiple time example shows a controlled array with an OK button to confirm the selection.

Format, columns and restrictions

format specifies the output and column composition: HH:mm leaves hours and minutes. Explicit showHour/showMinute/showSecond/showMillisecond override the visibility of the corresponding bits. Example formats show the composition of the panel separately from the model value.

In the masked time example, use the left and right arrows to move between hours, minutes, seconds and milliseconds. Type the digits and press Enter. The panel offers 100 ms increments, but you can type a value such as 347 ms. The range uses an HH:mm mask for both endpoints.

use12Hours enables selection of day period; in 12 hour example the field shows h:mm a, and the result is the same data in HH:mm. The format string does not turn the Dayjs object into a string model.

Use hourStep, minuteStep, secondStep and millisecondStep to set the increment for each column. Use disabledTime to restrict the available hours, minutes, seconds and milliseconds. In the working hours example, hideDisabledOptions hides unavailable choices.

The disabledSeconds callback receives the hour and minute. The disabledMilliseconds callback also receives the second. If the field is empty and all minutes are unavailable, disabledSeconds gets the minute from the panel time. For example, with pickerValue set to 08:09, the callback receives 9 for the minute. With hideDisabledOptions enabled, the minute column stays empty.

To restrict selection to the panel, use a plain format string with inputReadOnly. Masked fields still accept keyboard edits. The disabled property disables the entire field. status shows the status of the check, and mandatory rules and application restrictions are specified in Form. The dictionary comes from ConfigProvider or locale; for another language, match it to the Day.js locale.

Range and form submission

TimeRangePicker accepts a pair of Dayjs with possible empty borders or null. When confirmed, each boundary goes through its own selection and OK; onCalendarChange reports info.range=start/end. onChange returns the accepted pair; if completely cleared, both arguments are null. Range example outputs the result only after the boundaries are confirmed.

defaultOpenValue accepts one start date for start or a pair of candidates. allowEmpty allows empty borders, disabled blocks start and end independently, order defaults to ordering the selected times. For dependent constraints, disabledTime gets partial and info.from. Application example stores meeting time and work interval in separate models.

When you type a time into a saved range, TimeRangePicker and the generated RangePicker with picker="time" keep the date of the endpoint you edit. This also applies to masked input. For example, if you edit the start of an overnight shift, the end stays on the following day. If the format includes a date, onChange returns the day you entered.

In America/New_York, clocks jumped from 01:59 to 03:00 on March 8, 2026. If you open a range from March 7 on that day, you can still enter 02:31 using the HH:mm format. For an endpoint dated March 8, that local time does not exist, so the field keeps its previous value.

In call form onChange calls form.setFieldValue, required checks for time, reset restores initialValues. Store Dayjs before preparing the request. The application determines whether to pass the time as a string, how to associate it with the date, time zone, and desired precision.

Snippets and design

cellRender receives rank and info with subType and originNode. Render the originNode to save the native button, constraints and handlers. panelRender receives a standard panel snippet; add your content around it. Panel example keeps both original structures and adds the “Lunch” preset. renderExtraFooter receives the current panel mode and renders content at the bottom.

In the appointment example, components.time replaces the columns with preset choices. The panel reads restrictions from showTime.disabledTime. The OK button confirms the time, and a range is edited from the start to the end. The custom panel guide describes the context passed to the snippet.

The panel calls onModeChange to switch modes. Use TimePickerProps<DatePickerMode> or TimeRangePickerProps<DatePickerMode> to type the corresponding handlers.

In the time fields example, a snippet requests a numeric keyboard and the mask adds the colon between hours and minutes. TimeRangePicker passes range to each endpoint's editor. See the DatePicker editor guide for how to connect the field.

Use autoFocus to set the initial focus, tabIndex to control the tab order, and autoComplete to control browser autocomplete. These props also work with fields created by generatePicker. DatePicker focus example.

TimePicker and TimeRangePicker inherit the common ConfigProvider.prefixCls from -picker. Local non-empty prefixCls specifies the full name of the field, popup and columns; empty string/undefined select the provider. cellRender gets its resolved name via info.prefixCls, its originNode uses the same classes. The OK button inherits a separate common Button prefix. CSS time prefixes allow you to compare both fields, RTL and a separate namespace theme.cssVar.prefix.

Changing the prefix of a controlled TimePicker or TimeRangePicker keeps the panel open and preserves focus, typed text, the selection and the time awaiting confirmation. The design supports the standard, dark and compact theme without the required cssVar. The prefix/suffix color service variable uses the common provider prefix without dots, regardless of the local name and namespace of the theme; canonical area markers are preserved.

classNames and styles support root, prefix, input, suffix and nested popup slots. styles accepts CSS strings and objects. Both settings can be functions that receive the picker's props. The Semantic DOM example shows these settings in use.

Callbacks in ConfigProvider.timePicker can receive the props of a single, multiple, or range picker. Use Array.isArray to check the shape of props.value. When using different date adapters, check the date with dayjs.isDayjs before calling Day.js methods.

TimeRangePicker uses rangePicker.variant for variant. Component design tokens are set through the shared theme.components.DatePicker map and apply to both the field and the time panel.

The field needs an accessible name. The focus/blur methods are accessible via the instance; focus takes cursor=start/end/all, and the range also has index bounds. Escape closes the popup; Native panel buttons retain keyboard control. See the API for the supported options.

Use popupAlign and builtinPlacements to set anchor points and offsets for TimePicker and TimeRangePicker. The panel placement example shows how they work together.

Examples

Base time

Local value defaultValue. The panel contains hours, minutes and seconds.

09:30

Controlled time

Dayjs | null is stored in $state and updated via onChange. The button changes the same model on the outside.

09:00

Multiple time selection

multiple stores selected times in a Dayjs array. popupAlign sets the popup gap, and transitionName selects the animation.

2026-10-15T13:30:00.000Z
2026-10-15T09:00:00.000Z – 2026-10-15T18:00:00.000Z

Time and interval with JavaScript Date

Choose a meeting time in the panel. You can type the working hours in UTC.

Three sizes

large, medium and small; size without local prop is inherited from context.

null null

Time confirmation

By default, the time requires OK. needConfirm=false removes the button: the selection is applied without a separate confirmation.

Inaccessible input

disabled disables the entire field; inputReadOnly disables printing, keeping the selection in the panel.

Format and columns

HH:mm removes seconds from the panel; HH:mm:ss leaves them. The date format in the value is not serialized.

Time input mask

Enter a time down to the millisecond or set a range in hours and minutes.

09:00
Business hours

Custom time fields

Phones show a numeric keyboard. Enter 1015 to get 10:15.

Time steps

hourStep=2, minuteStep=15 and secondStep=10 define the available column options.

Explanation in the panel

renderExtraFooter receives the current panel mode. In time mode, it shows a time zone note.

13:30

12 hour format

use12Hours and the h:mm a format add a period of day; Russian locale shows it in Russian. The model stores the same time, the output next to it uses HH:mm.

09:00

Change by scroll

changeOnScroll selects the closest valid value after the column stops. Without needConfirm it is applied without OK.

null

Time range

TimeRangePicker is exported separately. Every boundary is confirmed; the result is a pair of Dayjs or null.

Design options

outlined, filled, borderless and underlined.

Test states

Error and warning for single time and range.

Prefix, suffix and clearing

Text and Svelte snippets for prefix/suffixIcon. allowClear.clearIcon replaces the clear icon.

Semantic styles

The styles object and function design the real slots fields and popups for both components.

Time restrictions

Working hours and available minutes are dependent on each other. hideDisabledOptions hides excluded options.

Own panel and cells

cellRender saves the original native button via originNode; panelRender wraps a standard panel. Preset sets the lunch time.

09:00

Appointment schedule

Choose an appointment time or a time range. There is a break at 12:00.

—

Time in Form

Mandatory field, send and reset. Form stores Dayjs, formatting is only needed to display the result.

09:30
Operating time
10:00 — 12:00

Meeting and work slot

Example from the review saved: single time and range with associated values.

09:30 Changes: 0
09:30 — 18:00 Changes: 0
Picker: project-picker

Select part of the time you typed or choose a minute before pressing OK. Changing the prefix keeps the input, selection and pending time in both pickers.

CSS time prefixes

Change prefixes in a controlled TimePicker and TimeRangePicker, with RTL and CSS variables.

Coverage Examples

15 main themes of live page ant.design 6.7 are compared. In Svelte, the range is exported as a TimeRangePicker, the rendering functions are replaced by snippets. The exact contract is specified by the public types of the package.

Topics of official TimePicker examples
ThemeExample Svelte
BasicBase time
MultipleMultiple time selection
Under ControlControlled time
Three SizesThree sizes
Need ConfirmTime confirmation
disabledInaccessible input
Hour and minuteFormat and columns
interval optionTime steps
AddonExplanation in the panel
12 hours12 hour format
Change on scrollChange by scroll
Time Range PickerTime range
VariantsDesign options
StatusTest states
Prefix and SuffixPrefix, suffix and clearing
Custom semantic dom stylingSemantic styles

API

The standard TimePicker takes Dayjs or null. Your application chooses the time zone. The component supports standard input attributes and exposes separate callbacks for time selection.

Main parameters TimePicker
PropertyDescriptionTypeDefault
prefixClsFull prefix of the field, popup and time columns; empty string/undefined selects a common prefix with -picker. The OK button inherits a separate Button prefix.stringGeneral prefix + -picker
multipleSelects several times.booleanfalse
valueControlled time via onChange. With multiple, pass an array of Dayjs dates.Dayjs | readonly Dayjs[] | nullundefined
componentsReplaces the input or the contents of the panel for a given mode.DatePickerComponentsundefined
defaultValueInitial local time.Dayjs | readonly Dayjs[] | nullundefined
formatSets the display format and panel columns. An object with type=mask enables segmented input.DatePickerFormat | DatePickerFormat[] | DatePickerFormatConfigHH:mm:ss / h:mm:ss a
use12HoursAdds a 12-hour cycle and localized period of day (AM/PM in enUS).booleanfalse
needConfirmThe draft is published after confirmation OK. false allows use without a separate button.booleantrue
defaultOpenValueInitial panel candidate; the field itself remains empty until selected.Dayjsundefined
hourStepClock pitch. minuteStep, secondStep and millisecondStep control their own columns.number1
showMillisecondMilliseconds column; coordinate the value format with the required accuracy.booleanFrom format
changeOnScrollSelects the nearest allowed option 300 ms after manual scrolling.booleanfalse
disabledTimeHours, minutes, seconds and milliseconds with dependencies on the units already selected.(date) => DatePickerDisabledTimeundefined
hideDisabledOptionsHides excluded options instead of showing disabled.booleanfalse
previewValuePre-hover text without onChange.false | hoverhover
onChangeCommitted time and its text. With multiple, both arguments are arrays. Clearing the field passes null for both arguments.TimePickerProps["onChange"] | TimePickerMultipleProps["onChange"]—
onCalendarChangeDraft. SinglePicker does not pass the range field.(value, text, info: {}) => void—
onKeyDownNative keyboard event. To cancel the action, call event.preventDefault(); TimeRangePicker has the same signature.(event: KeyboardEvent) => void—
onOkThe OK button passes the draft before onChange and before the popup closes. With multiple, the draft is an array of times.TimePickerProps["onOk"] | TimePickerMultipleProps["onOk"]—
allowClearallowClear.clearIcon sets the clearing icon. Disable clearing - allowClear=false.boolean | { clearIcon?: TimePickerContent }true
openVisibility control via onOpenChange; defaultOpen sets the initial one.booleanLocal
inputReadOnlyBlocks typing in a plain field. With a mask, the keyboard can still change the value.booleanfalse
autoFocusFocuses the editor when it appears. A range focuses the first enabled field.booleanfalse
tabIndexSets the tab order for the field.numberundefined
autoCompleteControls browser autocomplete for the field.HTMLInputAttributes["autocomplete"]off
renderExtraFooterRenders content at the bottom of the panel and receives its current mode.Snippet<[Mode]>undefined
prefixPrefix: text, number, snippet or null.TimePickerContentundefined
suffixIcontrue saves the clock; null or an empty string removes the suffix.TimePickerContent | trueClock icon
presetsReady time as Dayjs or callback; label - text or snippet.readonly TimePickerPreset[]undefined
cellRenderinfo contains subType, resolved by prefixCls and originNode - snippet of the native button with the same prefix.Snippet<[number | am | pm, TimePickerCellRenderInfo]>Standard cell
panelRenderWraps the standard composition, saving the lifecycle popup.Snippet<[Snippet]>Standard panel
classNamesClasses semantic slots; object or function with props.TimePickerSemanticundefined
stylesCSS strings and objects for the field and popup parts.TimePickerProps["styles"] | TimePickerMultipleProps["styles"]undefined
sizelarge, medium and small.ComponentSizeFrom context
variantLocal variant → closest Form.variant → ConfigProvider.timePicker.variant → general ConfigProvider.variant → outlined. TimeRangePicker uses rangePicker.variant.outlined | filled | borderless | underlinedFrom context / outlined
statusCheck status.error | warning | success | validatingFrom FormItem
localeGeneral calendar dictionary and timePickerLocale for hints.DatePickerLocaleFrom context
popupAlignOverrides anchor points, offsets and overflow settings for the selected placement.DatePickerPopupAlign—
builtinPlacementsReplaces the placement map for the panel.Readonly<Record<string, DatePickerPopupAlign>>Built-in map
transitionNameName of the popup CSS animation.stringComponent animation
getPopupContainerContainer popup; placement specifies the preferred position.(trigger) => HTMLElement | ShadowRootFrom ConfigProvider

TimeRangePicker API

TimeRangePicker is exported separately and inherits the time settings. Additional differences are listed below. When needConfirm=true, each boundary is confirmed separately.

Main parameters TimeRangePicker
PropertyDescriptionTypeDefault
prefixClsLocal owner of both fields, the common panel and columns. cellRender gets it via info.prefixCls; OK button and CSS variables are resolved independently.stringGeneral prefix + -picker
valueA couple of times. Callback returns RangePickerValue or null.RangePickerInputValue | nullundefined
componentsReplaces the input or the contents of the panel for a given mode.DatePickerComponentsundefined
defaultOpenValueOne candidate to start with or separate ones for both boundaries.Dayjs | [Dayjs, Dayjs]undefined
disabledDisabling both or individual borders.boolean | [boolean, boolean]From context
allowEmptyAllowed empty boundaries.boolean | [boolean, boolean]false
orderArranging selected times.booleantrue
onChangeConfirmed pair; when fully cleared, both arguments are null.(value, [string, string] | null) => void—
onCalendarChangeDraft with start/end.(value, texts, { range }) => void—
disabledTimeConstraints with the context of another boundary.(date, start | end, { from? }) => DatePickerDisabledTimeundefined
renderExtraFooterRenders content at the bottom of the panel and receives its current mode.Snippet<[Mode]>undefined
placeholderGeneral or individual tips.string | [string, string]From locale
autoFocusFocuses the editor when it appears. A range focuses the first enabled field.booleanfalse
tabIndexSets the tab order for the field.numberundefined
autoCompleteControls browser autocomplete for the field.HTMLInputAttributes["autocomplete"]off
stylesCSS strings and objects for the field and popup parts. A styles function receives the range picker props.TimeRangePickerProps["styles"]undefined

For individual label, set id.start/id.end. onfocus/onblur or compatible onFocus/onBlur events receive info.range. The local semantic callback accepts range props, and ConfigProvider.timePicker specifies the overall configuration of both components.

Methods

focus() and blur() are available through bind:this. Focus accepts preventScroll and cursor=start/end/all; for TimeRangePicker index=0/1 selects the border. bind:nativeElement returns the root div, bind:startInput/endInput of the range - native input elements.

<script lang="ts">
  import dayjs from 'dayjs';
  import { Button, TimePicker, TimeRangePicker } from '@woodger/antd';

  let single = $state<ReturnType<typeof TimePicker>>();
  let range = $state<ReturnType<typeof TimeRangePicker>>();
</script>

<style>.example {
    display: grid;
    gap: 16px;
  } .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }</style>

<div class="example">
  <TimePicker
    bind:this={single}
    aria-label={("TimePicker Methods")}
    format="HH:mm"
    defaultValue={dayjs('2026-10-15T09:30')}
  />
  <TimeRangePicker bind:this={range} format="HH:mm" style="width:100%"
    defaultValue={[dayjs('2026-10-15T09:00'), dayjs('2026-10-15T18:00')]}
    placeholder={(["Start time methods", "Time methods end"])} />
  <div class="actions">
    <Button
      onclick={() => single?.focus({ cursor: 'all' })}
    >{("Focus TimePicker")}</Button>
    <Button onclick={() => single?.blur()}>{("Remove Focus TimePicker")}</Button>
    <Button
      onclick={() => range?.focus({ index: 1 })}
    >{("End Focus TimeRangePicker")}</Button>
  </div>
</div>

Semantic DOM

Input has the role of combobox and is associated with the dialog panel. The down arrow moves focus to a column; arrows, Home/End move selection, Enter confirms, Escape cancels open interaction.

Select slot to highlight the current item. For popup, the panel will open automatically.

Real slots TimePicker and TimeRangePicker
SlotPurpose
rootRoot wrapper of the field.
prefixPrefix.
inputNative input; y range applies to both.
suffixSuffix.
popupRoot, content, item, footer and container panels; line is equivalent to popup.root.

styles contains CSS strings. styles.popup has root, content, item, footer and container available; classNames has the same nested form. cellRender must save the originNode so as not to lose the native button and its keyboard.

Registration tokens

The official TimePicker and DatePicker tables are the same: 40 component and 69 common tokens. In the package, the component map is called DatePicker. TimePicker/TimeRangePicker apply theme.components.DatePicker to the field and timebar. Semantic styles and ConfigProvider.timePicker specify local styling.

DatePicker Component Tokens
TokenPurpose
activeBgActive field background.
activeBorderColorActive frame.
activeShadowFocus shadow.
addonBgBackground of the additional area.
cellActiveWithRangeBgSelected range.
cellBgDisabledUnavailable day background.
cellHeightCell height.
cellHoverBgTargeting a cell.
cellHoverWithRangeBgPreliminary range.
cellRangeBorderColorRange frame.
cellWidthCell width.
errorActiveShadowError shadow.
hoverBgField background when hovering.
hoverBorderColorHover frame.
inputFontSizeMiddle field text.
inputFontSizeLGLarge field text.
inputFontSizeSMSmall field text.
multipleItemBgMultiple tag background.
multipleItemBorderColorMultiple tag frame.
multipleItemBorderColorDisabledInaccessible multiple tag frame.
multipleItemColorDisabledInaccessible multiple tag text.
multipleItemHeightHeight of multiple tag.
multipleItemHeightLGLarge multiple tag.
multipleItemHeightSMSmall multiple tag.
multipleSelectorBgDisabledInaccessible multiple-selector.
paddingBlockVertical offset.
paddingBlockLGLarge margin indent.
paddingBlockSMSmall margin indent.
paddingInlineHorizontal offset.
paddingInlineLGLarge margin indent.
paddingInlineSMSmall margin indent.
presetsMaxWidthMaximum width of presets.
presetsWidthWidth presets.
textHeightText height.
timeCellHeightTime variant height.
timeColumnHeightHeight of the time column.
timeColumnWidthTime column width.
warningActiveShadowShadow warning.
withoutTimeCellHeightDay altitude without time.
zIndexPopupLayer popup.

Common tokens of the current topic

The values ​​are read through theme.useToken() and react to the theme settings in the header.

Common tokens of the current topic
TokenMeaning
colorBgContainer#ffffff
colorBgContainerDisabledrgba(0,0,0,0.04)
colorBgElevated#ffffff
colorBorder#d9d9d9
colorBorderDisabled#d9d9d9
colorError#ff4d4f
colorErrorAffix#ff4d4f
colorErrorBg#fff2f0
colorErrorBgHover#fff1f0
colorErrorBorderHover#ffa39e
colorErrorText#ff4d4f
colorFillSecondaryrgba(0,0,0,0.06)
colorFillTertiaryrgba(0,0,0,0.04)
colorIconrgba(0,0,0,0.45)
colorIconHoverrgba(0,0,0,0.88)
colorLink#1677ff
colorLinkActive#0958d9
colorLinkHover#69b1ff
colorPrimary#2f54eb
colorPrimaryBorder#adc6ff
colorSplitrgba(5,5,5,0.06)
colorTextrgba(0,0,0,0.88)
colorTextDisabledrgba(0,0,0,0.25)
colorTextHeadingrgba(0,0,0,0.88)
colorTextLightSolid#fff
colorTextPlaceholderrgba(0,0,0,0.25)
colorTextQuaternaryrgba(0,0,0,0.25)
colorTextTertiaryrgba(0,0,0,0.45)
colorWarning#faad14
colorWarningAffix#faad14
colorWarningBg#fffbe6
colorWarningBgHover#fff1b8
colorWarningBorderHover#ffd666
colorWarningText#faad14
borderRadius6
borderRadiusLG8
borderRadiusSM4
borderRadiusXS2
boxShadowSecondary 0 6px 16px 0 rgba(0,0,0,0.08), 0 3px 6px -4px rgba(0,0,0,0.12), 0 9px 28px 8px rgba(0,0,0,0.05)
controlHeight32
controlHeightLG40
controlHeightSM24
controlItemBgActive#f0f5ff
fontFamily-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'
fontSize14
fontSizeLG16
fontSizeSM12
fontWeightStrong600
lineHeight1.5714285714285714
lineHeightLG1.5
lineTypesolid
lineWidth1
lineWidthBold2
linkDecorationnone
linkFocusDecorationnone
linkHoverDecorationnone
marginXS8
marginXXS4
motionDurationMid0.2s
motionDurationSlow0.3s
motionEaseInOutCirccubic-bezier(0.78, 0.14, 0.15, 0.86)
motionEaseInQuintcubic-bezier(0.755, 0.05, 0.855, 0.06)
motionEaseOutCirccubic-bezier(0.08, 0.82, 0.17, 1)
motionEaseOutQuintcubic-bezier(0.23, 1, 0.32, 1)
padding16
paddingSM12
paddingXS8
paddingXXS4
sizePopupArrow16

ConfigProvider.timePicker

The general configuration specifies class, style, variant, classNames/styles, suffixIcon and cleanup. Local props take precedence; the nested timePicker object replaces the entire parent.

<script lang="ts">
  import dayjs from 'dayjs';
  import { ConfigProvider, TimePicker } from '@woodger/antd';
</script>

<ConfigProvider timePicker={{
  variant: 'filled', suffixIcon: '◷', styles: {
    root: 'border:2px solid #722ed1'
  }
}}>
  <TimePicker
    aria-label={("Time from ConfigProvider")}
    defaultValue={dayjs('2026-10-15T09:30')}
    format="HH:mm"
  />
</ConfigProvider>

FAQ

Why is the model still the same after selecting a column?

By default needConfirm=true. Confirm OK or use needConfirm=false. Intermediate selection is available via onCalendarChange.

How to leave only hours and minutes?

Pass format=HH:mm. Explicit showHour/showMinute/showSecond can separately override the composition of the panel.

How to limit the end of the interval?

Return constraints from disabledTime given partial=start/end and info.from. The model remains a pair of Dayjs.

Why does the text change when you hover, but not the result?

This is previewValue=hover. It doesn't publish the selection; false disables browsing, and changeOnScroll separately enables scroll selection.

How to replace the React render function?

cellRender and panelRender accept Svelte snippets. Save info.originNode and the standard panel snippet, as in the custom panel example.

Is it possible to pass Date or Moment instead of Dayjs?

Create the fields with DatePicker.generatePicker(adapter). Use the returned TimePicker for a single time or RangePicker with picker="time" for an interval. In the JavaScript Date example, both fields store Date objects and show time in UTC. The DatePicker guide describes what the adapter provides.

When does the value of a controlled range change?

Choose a minute in the prefix example. While the panel is open, the output below the fields still shows the previous range. If the application changes the prefix, the pending minute selection stays in place. Press OK and onChange receives the new pair. The controlled range example shows how to store it.