-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using DateFormField instead of DateInputV2 #6227
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
The bug here is that, initially, when we click the last service detail, the calendar sometimes, becomes only half visible, so, when we try to click on the date to select, on the first click, it makes the component fully visible, and on the next click only the date selection takes place. The above situation shouldn't be the ideal case, on the first click itself the user should be able to select the date Note: This bug won't occur, if the user manually scrolls and makes the component fully visible first and click on the date. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR still doesn't solve the underlying issue
Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions. |
WHAT
🤖 Generated by Copilot at 1f85408
Updated the date input components for asset creation and service records. Used
DateFormField
instead ofDateInputV2
to improve date validation and state management. Fixed some bugs related to date logic inAssetCreate.tsx
andAssetServiceEditModal.tsx
.Proposed Changes
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist
HOW
🤖 Generated by Copilot at 1f85408
DateInputV2
component withDateFormField
component, which adds validation and error handling for date inputs, in two components:AssetCreate
andAssetServiceEditModal
(link, link, link, link)onChange
handler ofDateFormField
component inAssetCreate
component to use thevalue
property of the date object, instead of the date object itself, for comparison and state update, and remove themax
prop of theDateInputV2
component, as it is handled by theDateFormField
component (link, link)onChange
handler ofDateFormField
component inAssetServiceEditModal
component to check if the selected service date is after the creation date of the service record, and show an error notification if so (link)