Date Picker Integrated with the Add Task Modal #172
Merged
+193
−59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added a date picker component to the task form's Due field to improve user experience when creating tasks. Previously, users had to manually type dates in YYYY-MM-DD format, which was error-prone and inconvenient. Now users can select dates from a visual calendar dropdown.
Changes:
Installed
react-day-pickerdependency for calendar functionalityCreated
calendar.tsxUI component with proper styling and theme integrationCreated
date-picker.tsxUI component with popover and modal supportAdded
cn()utility function tolib/utils.tsxfor CSS class mergingIntegrated DatePicker into both "Add Task" dialogs (when tasks exist and when no tasks found)
Fixed modal conflict issue where clicking the calendar would close the parent dialog
Dates are automatically formatted to
YYYY-MM-DDformat for backend compatibilityFixes: Add Calendar Date Picker to “Due” Field in Task Form #170
Checklist
npx prettier --write .(for formatting)gofmt -w .(for Go backend) - N/A, frontend-only changesnpm test(for JS/TS testing)Additional Notes
Technical Details:
modal={true}prop on Popover prevents dialog closure conflictstype="button"prevents accidental form submissionsScreenshots:

Dependencies Added:
react-day-picker@^8.10.1Files Modified:
frontend/src/components/HomeComponents/Tasks/Tasks.tsxfrontend/src/lib/utils.tsxFiles Created:
frontend/src/components/ui/calendar.tsxfrontend/src/components/ui/date-picker.tsx