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

Method _togglePicker

packages/main/src/DateTimePicker.ts:198–214  ·  view source on GitHub ↗

* @override * @private

()

Source from the content-addressed store, hash-verified

196 * @private
197 */
198 _togglePicker() {
199 super._togglePicker();
200
201 if (this.open) {
202 let timeSelectionValue = this.value;
203
204 // If current value is invalid, use the last valid value for time selection
205 if (!timeSelectionValue || !this.isValidValue(timeSelectionValue)) {
206 timeSelectionValue = this._lastValidValue || this.getValueFormat().format(UI5Date.getInstance());
207 }
208
209 this._previewValues = {
210 ...this._previewValues,
211 timeSelectionValue,
212 };
213 }
214 }
215
216 get formValidityMessage() {
217 const validity = this.formValidity;

Callers 2

_submitClickMethod · 0.95
_cancelClickMethod · 0.95

Calls 3

getValueFormatMethod · 0.95
isValidValueMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected