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

Method _calendarTimestamp

packages/main/src/DatePicker.ts:503–510  ·  view source on GitHub ↗

* Used to provide a timestamp to the Calendar (to focus it to a relevant date when open) based on the component's state * Override in derivatives to provide the calendar a timestamp based on their properties * By default focus the calendar on the selected date if set, or the current day otherwis

()

Source from the content-addressed store, hash-verified

501 * @protected
502 */
503 get _calendarTimestamp(): number {
504 if (this.value && this.dateValueUTC && this._checkValueValidity(this.value)) {
505 const millisecondsUTC = this.dateValueUTC.getTime();
506 return getRoundedTimestamp(millisecondsUTC);
507 }
508
509 return getTodayUTCTimestamp(this._primaryCalendarType);
510 }
511
512 /**
513 * Used to provide selectedDates to the calendar based on the component's state

Callers

nothing calls this directly

Calls 3

_checkValueValidityMethod · 0.95
getRoundedTimestampFunction · 0.85
getTodayUTCTimestampFunction · 0.85

Tested by

no test coverage detected