TimePicker: fixed minor issues with new timepicker (#17756)

This commit is contained in:
Torkel Ödegaard 2019-06-25 16:39:48 +02:00 committed by GitHub
parent 2c5400c61e
commit 40708bef10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -28,6 +28,14 @@ export class TimePickerCalendar extends PureComponent<Props> {
onChange(newDate);
};
onDrilldown = (props: any) => {
// this is to prevent clickout side wrapper from triggering when drilling down
if (window.event) {
// @ts-ignore
window.event.stopPropagation();
}
};
render() {
const { value, roundup, timeZone } = this.props;
let date = stringToDateTimeType(value, roundup, timeZone);
@ -44,6 +52,7 @@ export class TimePickerCalendar extends PureComponent<Props> {
className="time-picker-calendar"
tileClassName="time-picker-calendar-tile"
onChange={this.onCalendarChange}
onDrillDown={this.onDrilldown}
nextLabel={<span className="fa fa-angle-right" />}
prevLabel={<span className="fa fa-angle-left" />}
/>

View File

@ -111,8 +111,9 @@ $arrowPadding: $arrowPaddingToBorder * 3;
}
.time-picker-calendar {
border: 1px solid $popover-border-color;
border: 1px solid $input-border-color;
color: $black;
width: 260px;
.react-calendar__navigation__label,
.react-calendar__navigation__arrow,
@ -150,6 +151,7 @@ $arrowPadding: $arrowPaddingToBorder * 3;
background: $panel-editor-viz-item-bg-hover;
border: $panel-editor-viz-item-border-hover;
color: $text-color-strong;
position: relative;
}
}