Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/main/src/DayPicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,20 @@ class DayPicker extends CalendarPart implements ICalendarPicker {
this.selectedDates = this.selectedDates.filter(value => value !== timestamp);
}

_onmousedown(e: MouseEvent) {
let target = e.target as HTMLElement;

if (!target.hasAttribute("data-sap-timestamp")) {
target = target.parentNode as HTMLElement;
}

if (!this._isDayPressed(target)) {
return;
}

this._safelySetTimestamp(this._getTimestampFromDom(target));
}
Comment thread
hinzzx marked this conversation as resolved.

/**
* Called when at least one day is selected and the user presses "Shift".
* @param timestamp
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/DayPickerTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function DayPickerTemplate(this: DayPicker) {
}}
onKeyDown={this._onkeydown}
onKeyUp={this._onkeyup}
onMouseDown={this._onmousedown}
onClick={this._onclick}
onMouseOver={this._onmouseover}
>
Expand Down
Loading