Skip to content

Commit

Permalink
feat: add edit time filter
Browse files Browse the repository at this point in the history
  • Loading branch information
caioapolonio committed Jan 2, 2025
1 parent f966856 commit fdb9991
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/DateFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ const DateFilter: React.FC<PropsWithChildren> = () => {
setDate(selectedDays.start);
inputRef.current?.blur();
setCalendarOpen(false);
// setButtonActive(false);
}, [selectedDays, startTime, endTime, filterDate]);

const handleStartTimeChange = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -325,7 +324,7 @@ const DateFilter: React.FC<PropsWithChildren> = () => {
</OutsideContainer>

{calendarOpen && (
<CalendarContainer onMouseDown={e => e.preventDefault()}>
<CalendarContainer>
<CalendarHeader>
<strong>
<h3>Date Filter</h3>
Expand Down Expand Up @@ -392,6 +391,7 @@ const DateFilter: React.FC<PropsWithChildren> = () => {
<TimeSelector>
<label>Start Time:</label>
<TimeInput
style={{ WebkitAppearance: 'none' }}
type="time"
id="start-time"
value={startTime}
Expand Down
3 changes: 2 additions & 1 deletion src/components/DateFilter/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ export const TimeInput = styled.input`
border: 1px solid ${props => props.theme.gray700};
${props => props.theme.dark && `color-scheme: dark;`}
border-radius: 0.25rem;
width: 7rem;
min-width: 4rem;
max-width: 5.2rem;
`;

export const CalendarContainer = styled.div`
Expand Down

0 comments on commit fdb9991

Please sign in to comment.