MCPcopy Create free account
hub / github.com/UI5/webcomponents / DateTimePicker

Class DateTimePicker

packages/main/src/DateTimePicker.ts:118–529  ·  view source on GitHub ↗

* @class * * ### Overview * The `DateTimePicker` component alows users to select both date (day, month and year) and time (hours, minutes and seconds) * and for the purpose it consists of input field and Date/Time picker. * * ### Usage * * Use the `DateTimePicker` if you need a combined date

Source from the content-addressed store, hash-verified

116 * @public
117 */
118@customElement({
119 tag: "ui5-datetime-picker",
120 template: DateTimePickerTemplate,
121 styles: [
122 DatePicker.styles,
123 DateTimePickerCss,
124 DateTimePickerPopoverCss,
125 ],
126})
127class DateTimePicker extends DatePicker implements IFormInputElement {
128 /**
129 * Defines the visibility of the time view in `phoneMode`.
130 * For more information, see the `phoneMode` property.
131 *
132 * **Note:** The date view would be displayed by default.
133 * @default false
134 * @private
135 */
136 @property({ type: Boolean, noAttribute: true })
137 _showTimeView = false
138
139 /**
140 * Defines if the `DateTimePicker` should be displayed in phone mode.
141 * The phone mode turns on when the component is used on small screens or phone devices.
142 * In phone mode the user can see either the calendar view, or the time view
143 * and can switch between the views via toggle buttons.
144 * @default false
145 * @private
146 */
147 @property({ type: Boolean })
148 _phoneMode = false;
149
150 /**
151 * Selected, but not yet confirmed date/time
152 * @private
153 */
154 @property({ type: Object })
155 _previewValues: PreviewValues = {};
156
157 /**
158 * Stores the last valid value to preserve time when entering invalid values
159 * @private
160 */
161 _lastValidValue = "";
162
163 @query("[ui5-time-selection-clocks]")
164 _clocks!: TimeSelectionClocks;
165
166 _handleResizeBound: ResizeObserverCallback;
167
168 constructor() {
169 super();
170 this._handleResizeBound = this._handleResize.bind(this);
171 }
172
173 /**
174 * @override
175 */

Callers

nothing calls this directly

Calls 3

customElementFunction · 0.85
propertyFunction · 0.85
queryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…