-
Notifications
You must be signed in to change notification settings - Fork 225
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) O3-3632 - Add config for maxDate and minDate to DateObsField #1261
Changes from all commits
e40f4c0
0cd381b
32486f2
e1aa33b
f95c9bb
9f1979a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { Type, validator, validators } from '@openmrs/esm-framework'; | ||
import _default from 'yup/lib/locale'; | ||
|
||
export interface SectionDefinition { | ||
id: string; | ||
|
@@ -12,7 +13,8 @@ export interface FieldDefinition { | |
label?: string; | ||
uuid: string; | ||
placeholder?: string; | ||
dateFormat?: string; | ||
allowFutureDates?: boolean; | ||
allowPastDates?: boolean; | ||
Comment on lines
+16
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You have modified the type but you have not modified the actual config schema. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You must modify the actual config schema; there should be a console warning about that visible in the browser console logs. Please use the browser console. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
showHeading: boolean; | ||
validation?: { | ||
required: boolean; | ||
|
@@ -176,6 +178,16 @@ export const esmPatientRegistrationSchema = { | |
_default: '', | ||
_description: 'Placeholder that will appear in the input.', | ||
}, | ||
allowFutureDates: { | ||
_type: Type.Boolean, | ||
_default: true, | ||
_description: 'Indicates whether the date input field should allow the selection of future dates or not.', | ||
}, | ||
allowPastDates: { | ||
_type: Type.Boolean, | ||
_default: true, | ||
_description: 'Indicates whether the date input field should allow the selection of past dates or not.', | ||
}, | ||
validation: { | ||
required: { _type: Type.Boolean, _default: false }, | ||
matches: { | ||
|
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.
May as well remove placeholder here too? Also, these should be removed from the actual config schema and not just the types.