Fix Android date picker ignoring past (and future) dates on workout/cardio logging#1
Fix Android date picker ignoring past (and future) dates on workout/cardio logging#1Copilot wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…g event.type Agent-Logs-Url: https://github.com/NeonGems65/bulktech/sessions/cae926ae-7d07-469c-8ec2-e976c09c61bb Co-authored-by: NeonGems65 <119536884+NeonGems65@users.noreply.github.com>
|
@copilot Everything works perfectly on the local development server (when there's nothing on it). But when I edit the date on the already pre-existing database, it does not change. Is there a way to run the app connected to my Render database? |
Yes — the app already supports this via environment variables. Here's how: Connect the Expo app to your Render server Create Then restart Connect the local server to your Render (Neon) database If you also want to run the server locally but have it talk to the Render/Neon database, create The Once the app is hitting the same Render backend (and thus the same database), the date-edit fix should apply to pre-existing rows too — the PUT endpoint has always accepted the |
On Android,
DateTimePickerAndroid.openfiresonChangetwice after a user confirms a date: once withtype: 'set'(the selected date) and once withtype: 'dismissed'(the originalvalue— today). Because the handlers ignored the event entirely, the second call silently overwrote the user's selection with today's date.Changes
InputWorkout.tsx/CardioTracker.tsx— all four date/time change handlers (onAddDateChange,onAddTimeChange,onEditDateChange,onEditTimeChange) now guard state updates onevent.type === 'set':The same pattern was applied to both the workout and cardio trackers, since both shared the same bug.
Original prompt
This pull request was created from Copilot chat.