Skip to content

Commit

Permalink
fix: "Now" also adjusts date (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcknett authored Jan 2, 2024
1 parent 4fc7410 commit 16f7bbb
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 16f7bbb

Please sign in to comment.