Skip to content

Commit

Permalink
fix: "Now" also adjusts date
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcknett committed Jan 2, 2024
1 parent 4fc7410 commit a9de5d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/TimeEntryForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,14 @@ export function TimeEntryForm() {
evt?.preventDefault();
const now = new Date();
setValue('startTime', timeString(now));
setValue('dateEntry', dateString(now));
};

const setEndToNow = (evt?: MouseEvent<HTMLButtonElement>) => {
evt?.preventDefault();
const now = new Date();
setValue('endTime', timeString(now));
setValue('dateEntry', dateString(now));
};

const defaultPlaceholder = recentList ? `${recentList} (last used)` : `${DEFAULT_LIST} (default)`;
Expand Down

0 comments on commit a9de5d5

Please sign in to comment.