Skip to content

Commit

Permalink
Fix shifted label; Removed unused stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Minnowo committed Sep 28, 2024
1 parent 45c7233 commit a02db39
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions ui/src/common/DateTimeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ interface DateTimeSelectorProps {
showDate: boolean;
label: string;
popoverOpen?: (open: boolean) => void;
style?: object;
}

export const DateTimeSelector: React.FC<DateTimeSelectorProps> = React.memo(
({selectedDate, onSelectDate, showDate, label, popoverOpen = () => {}, style = null}) => {
({selectedDate, onSelectDate, showDate, label, popoverOpen = () => {}}) => {
const [open, setOpen] = React.useState(false);
const localeData = moment.localeData();
const time = localeData.longDateFormat('LT').replace('A', 'a');
Expand All @@ -23,10 +22,11 @@ export const DateTimeSelector: React.FC<DateTimeSelectorProps> = React.memo(

return (
<KeyboardDateTimePicker
className="time-picker"
variant="dialog"
InputProps={{disableUnderline: true}}
title={selectedDate.format()}
style={{minWidth: width, maxWidth: width, ...style}}
style={{width: width}}
PopoverProps={{
onEntered: () => {
popoverOpen(true);
Expand Down
1 change: 0 additions & 1 deletion ui/src/common/TagChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const TagChip = ({color, label}: {label: string; color: string}) => {
color: textColor,
cursor: 'text',
minHeight: '32px',
height: 'auto',
whiteSpace: 'normal',
wordBreak: 'break-word',
}}
Expand Down
9 changes: 5 additions & 4 deletions ui/src/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,26 @@ html {
}

/* The wrapping box around the input and icon for the datetime picker */
.MuiInputBase-root.MuiInput-root.MuiInputBase-formControl.MuiInput-formControl.MuiInputBase-adornedEnd {
.time-picker .MuiInputBase-root.MuiInput-root.MuiInputBase-formControl.MuiInput-formControl.MuiInputBase-adornedEnd {
margin-top: 0;
}

/* The calendar icon for the datetime picker */
.MuiInputBase-root.MuiInputBase-formControl.MuiInputBase-adornedEnd
.time-picker
.MuiInputBase-root.MuiInputBase-formControl.MuiInputBase-adornedEnd
.MuiInputAdornment-root.MuiInputAdornment-positionEnd
.MuiButtonBase-root.MuiIconButton-root {
position: absolute;
left: 0;
}

/* The label for the datetime picker */
.MuiFormControl-root.MuiTextField-root .MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl {
.time-picker.MuiFormControl-root.MuiTextField-root .MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl {
margin-left: 48px;
}

/* The input box for the datetime picker */
.MuiFormControl-root.MuiTextField-root .MuiInputBase-input.MuiInput-input.MuiInputBase-inputAdornedEnd {
.time-picker.MuiFormControl-root.MuiTextField-root .MuiInputBase-input.MuiInput-input.MuiInputBase-inputAdornedEnd {
margin-left: 48px;
/* margin-top: 8px; */
margin-top: 12px;
Expand Down

0 comments on commit a02db39

Please sign in to comment.