-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: add year month selector to calendar component #1663
base: master
Are you sure you want to change the base?
feat: add year month selector to calendar component #1663
Conversation
🚀 Deployed on https://pr-1663--dhis2-ui.netlify.app |
@@ -38,6 +38,7 @@ export const CalendarInput = ({ | |||
strictValidation, | |||
inputWidth, | |||
dataTest = 'dhis2-uiwidgets-calendar-inputfield', | |||
pastOnly, |
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.
as a general approach - shouldn't this just be controlled by minDate
/ maxDate
from the client? The client should set the max date (we have a helper that gets the current date in the specified calendar) .. it will then avoid having hardcoded number of years that seems tracker-specific right now
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 minDate and maxDate validation parameters are not being passed through to the calendar component. Also, the useDatePicker hook is not utilizing these validation parameters because the validateDateString function is being called directly within the calendar input component.
There is already another issue to disable out of range dates I think it would be better to keep it this way for now.
Design changes from review are included in this PR |
fix: calendar select styles
|
Implements LIBS-726
Other PR: dhis2/multi-calendar-dates#84
Desc
Checklist