- Properties
- blur EmitType<BlurEventArgs>
- change EmitType<ChangeEventArgs>
- cleared EmitType<ClearedEventArgs>
- close EmitType<PopupEventArgs>
- created EmitType<Object>
- destroyed EmitType<Object>
- focus EmitType<FocusEventArgs>
- itemRender EmitType<ItemEventArgs>
- open EmitType<PopupEventArgs>
- allowEdit boolean
- cssClass string
- enableMask boolean
- enablePersistence boolean
- enableRtl boolean
- enabled boolean
- floatLabelType FloatLabelType|string
- format string|TimeFormatObject
- fullScreenMode boolean
- htmlAttributes { : }
- keyConfigs { : }
- locale string
- maskPlaceholder TimeMaskPlaceholderModel
- max Date
- min Date
- openOnFocus boolean
- placeholder string
- readonly boolean
- scrollTo Date
- serverTimezoneOffset number
- showClearButton boolean
- step number
- strictMode boolean
- value Date
- width string|number
- zIndex number
Contact Support
TimePickerModel
23 Sep 20256 minutes to read
Interface for a class TimePicker
Properties
blur EmitType<BlurEventArgs>
Triggers when the control loses the focus.
change EmitType<ChangeEventArgs>
Triggers when the value is changed.
cleared EmitType<ClearedEventArgs>
Triggers when timepicker value is cleared using clear button.
close EmitType<PopupEventArgs>
Triggers when the popup is closed.
created EmitType<Object>
Triggers when the component is created.
destroyed EmitType<Object>
Triggers when the component is destroyed.
focus EmitType<FocusEventArgs>
Triggers when the control gets focused.
itemRender EmitType<ItemEventArgs>
Triggers while rendering the each popup list item.
open EmitType<PopupEventArgs>
Triggers when the popup is opened.
allowEdit boolean
Support for
allowEdithas been provided from
v16.2.46.
Specifies whether the input textbox is editable or not. Here the user can select the value from the
popup and cannot edit in the input textbox.
cssClass string
Specifies the root CSS class of the TimePicker that allows to
customize the appearance by overriding the styles.
enableMask boolean
Specifies whether it is a masked timepicker or not.
By default the timepicker component render without masked input.
If you need masked timepicker input then specify it as true.
enablePersistence boolean
Enable or disable the persisting component’s state between the page reloads. If enabled, following list of states will be persisted.
- Value
enableRtl boolean
Enable or disable rendering component in right to left direction.
enabled boolean
Specifies whether the component to be disabled or not.
floatLabelType FloatLabelType|string
Specifies the placeholder text to be floated.
Possible values are:
Never: The label will never float in the input when the placeholder is available.
Always: The floating label will always float above the input.
Auto: The floating label will float above the input after focusing or entering a value in the input.
format string|TimeFormatObject
Specifies the format of value that is to be displayed in component. By default, the format is
based on the culture.
For more details refer to
Formatdocumentation.
<ejs-timepicker [format]="format"></ejs-timepicker>import { Component, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-root',
styleUrls: ['app.component.css'],
templateUrl: 'app.component.html',
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
constructor() { }
public format = { skeleton: 'Hms' };
}fullScreenMode boolean
Specifies the component popup display full screen in mobile devices.
htmlAttributes { : }
You can add the additional html attributes such as disabled, value etc., to the element.
If you configured both property and equivalent html attribute then the component considers the property value.
<ejs-timepicker [htmlAttributes]="htmlAttributes"></ejs-timepicker>import { Component, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-root',
styleUrls: ['app.component.css'],
templateUrl: 'app.component.html',
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
constructor() { }
public htmlAttributes = { name: "period", placeholder:"Select a time" };
}keyConfigs { : }
Customizes the key actions in TimePicker.
For example, when using German keyboard, the key actions can be customized using these shortcuts.
|
Key action |
Key |
|
enter |
enter |
|
escape |
escape |
|
end |
end |
|
tab |
tab |
|
home |
home |
|
down |
downarrow |
|
up |
uparrow |
|
left |
leftarrow |
|
right |
rightarrow |
|
open |
alt+downarrow |
|
close |
alt+uparrow |
<ejs-timepicker [keyConfigs]="keyConfigs"></ejs-timepicker>import { Component, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-root',
styleUrls: ['app.component.css'],
templateUrl: 'app.component.html',
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
constructor() { }
public keyConfigs = {
enter: "space",
home: "ctrl+home",
end: "ctrl+end"
};
}locale string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
maskPlaceholder TimeMaskPlaceholderModel
Specifies the mask placeholder to be displayed on masked timepicker.
max Date
Gets or sets the maximum time value that can be allowed to select in TimePicker.
For more details refer to
Time Rangedocumentation.
min Date
Gets or sets the minimum time value that can be allowed to select in TimePicker.
For more details refer to
Time Rangedocumentation.
openOnFocus boolean
By default, the popup opens while clicking on the timepicker icon.
If you want to open the popup while focusing the time input then specify its value as true.
placeholder string
Specifies the placeholder text that is displayed in textbox.
readonly boolean
Specifies the component in readonly state.
scrollTo Date
Specifies the scroll bar position if there is no value is selected in the popup list or
the given value is not present in the popup list.
For more details refer to
Time Durationsample.
<ejs-timepicker [scrollTo]="scrollTo"></ejs-timepicker>import { Component, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-root',
styleUrls: ['app.component.css'],
templateUrl: 'app.component.html',
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
constructor() { }
public scrollTo = new Date("1/1/2018 5:30 PM");
}serverTimezoneOffset number
By default, the time value will be processed based on system time zone.
If you want to process the initial time value using server time zone
then specify the time zone value to serverTimezoneOffset property.
showClearButton boolean
Specifies whether to show or hide the clear icon.
step number
Specifies the time interval between the two adjacent time values in the popup list.
For more details refer to
Formatdocumentation.
strictMode boolean
Specifies the component to act as strict so that, it allows to enter only a valid time value within a specified range or else
resets to previous value. By default, strictMode is in false.
For more details refer to
Strict Modedocumentation.
value Date
Gets or sets the value of the component. The value is parsed based on the culture specific time format.
width string|number
Gets or sets the width of the TimePicker component. The width of the popup is based on the width of the component.
zIndex number
specifies the z-index value of the timePicker popup element.