@progress/kendo-vue-dateinputs
Version:
181 lines (180 loc) • 6.31 kB
TypeScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import { DateInputFormatPlaceholder } from '../../dateinput/models/format-placeholder';
import { TimePickerIncrementalSteps } from './IncrementalSteps';
import { DateInputsPopupSettings } from '../../PopupSettings';
import { DateFormatOptions } from '@progress/kendo-vue-intl';
/**
* @hidden
*/
export interface TimePickerSettings {
/**
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
* For example these elements could contain error or hint message.
*/
ariaDescribedBy?: string;
/**
* Identifies the element(s) which will label the component.
*/
ariaLabelledBy?: string;
/**
* Determines whether to display the **Cancel** button in the popup.
*/
cancelButton?: boolean;
/**
* Determines whether to display the **Now** button in the popup.
*
* > If the current time is out of range or the incremental step is greater than `1`, the **Now** button will be hidden.
*/
nowButton?: boolean;
/**
* Sets the default state of the popup upon render ([see example]({% slug default_value_timepicker %}#toc-setting-the-default-popup-state)).
*/
defaultShow?: boolean;
/**
* Determines whether the TimePicker is disabled ([see example]({% slug disabled_timepicker %})).
*/
disabled?: boolean;
/**
* Specifies the date format that is used to display the input value ([see example]({% slug formats_timepicker %})).
*/
format?: string | DateFormatOptions;
/**
* Defines the descriptions of the format sections in the input field ([see example]({% slug placeholders_timepicker %})).
*/
formatPlaceholder?: DateInputFormatPlaceholder;
/**
* Specifies the `id` of the TimePicker.
*/
id?: string;
/**
* Specifies the greatest valid time ([see example]({% slug timeranges_timepicker %})).
*/
max?: Date;
/**
* Specifies the smallest valid time ([see example]({% slug timeranges_timepicker %})).
*/
min?: Date;
/**
* Specifies the `name` property of the `input` DOM element.
*/
name?: string;
/**
* Renders a floating label for the TimePicker.
*/
label?: string;
/**
* Specifies the value of the placeholder.
*/
placeholder?: string;
/**
* Configures the `size` of the TimeInput.
*
* The available options are:
* - small
* - medium
* - large
* - null—Does not set a size `class`.
*
* @default `medium`
*/
size?: null | 'small' | 'medium' | 'large';
/**
* Configures the `roundness` of the TimeInput.
*
* The available options are:
* - small
* - medium
* - large
* - circle
* - full
* - null—Does not set a rounded `class`.
*
* @default `medium`
*/
rounded?: null | 'small' | 'medium' | 'large' | 'full' | string;
/**
* Configures the `fillMode` of the TimeInput.
*
* The available options are:
* - solid
* - outline
* - flat
* - link
* - null—Does not set a fillMode `class`.
*
* @default `solid`
*/
fillMode?: null | 'solid' | 'outline' | 'flat' | string;
/**
* Fires each time any of the TimePicker elements gets blurred.
*/
onBlur?: (event: any) => void;
/**
* Fires each time the user focuses any of the TimePicker elements.
*/
onFocus?: (event: any) => void;
/**
* Fires when the icon element is clicked.
*/
onIconclick?: (event: any) => void;
/**
* Configures the popup options of the TimePicker.
*
* The available options are:
* - `animate: Boolean`—Controls the popup animation. By default, the open and close animations are enabled.
* - `appendTo:`— Defines the container to which the Popup will be appended. Defaults to [`body`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body).
* - `popupClass: String`—Specifies a list of CSS classes that are used to style the popup.
*/
popupSettings?: DateInputsPopupSettings;
/**
* Specifies if a time selector will be displayed ([see example]({% slug controlled_timepicker %}#toc-controlling-the-popup-state)).
*/
show?: boolean;
/**
* Configures the incremental steps of the TimePicker ([see example]({% slug incrementalsteps_timepicker %})).
*
* > If the incremental step is greater than `1`, the **Now** button will be hidden.
*/
steps?: TimePickerIncrementalSteps;
/**
* Toggles the smooth scroll animation on time click. By default, the animation is enabled.
*/
smoothScroll?: boolean;
/**
* Sets the `tabIndex` property of the TimePicker.
*/
tabIndex?: number;
/**
* Sets the title of the `input` element of the TimePicker.
*/
title?: string;
/**
* Specifies the width of the TimePicker.
*/
width?: number | string;
/**
* Enables the customization or the override of the default Popup which is rendered by the TimePicker
* ([see example]({% slug custom_rendering_timepicker %}#toc-customizing-the-popup)).
*/
popup?: any;
/**
* Enables the customization or the override of the default DateInput which is rendered by the TimePicker
* ([see example]({% slug custom_rendering_timepicker %}#toc-customizing-the-dateinput)).
*/
dateInput?: any;
/**
* Specifies the validate of the TimePicker.
*/
validate?: boolean;
/**
* Sets the built-in HTML attributes of the inner focusable input element.
* Attributes which are essential for certain component functionalities cannot be changed.
*/
inputAttributes?: Object;
}