-
Notifications
You must be signed in to change notification settings - Fork 59
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-2491: Add support for a time picker #312
Conversation
cefccd4
to
7822ff2
Compare
Size Change: +372 B (+0.04%) Total Size: 1.05 MB ℹ️ View Unchanged
|
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.
For cases where datePickerFormat
is set to "timer", what kind of value will be submitted to the backend? @NethmiRodrigo Can you share a sample payload of an obs?
src/types.ts
Outdated
@@ -261,6 +262,7 @@ export type RenderType = | |||
| 'content-switcher' | |||
| 'date' | |||
| 'datetime' | |||
| 'time' |
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.
Here you're introducing a new rendering that is supported through the "date" rendering. With the introduction of the datePickerFormat
prop, we only need one rendering "date". Meaning we should consider removing or deprecating the "datetime" rendering.
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.
Adding time
was a mistake so I removed it. Leaving datetime
as it is for now as it has being referenced in a couple of places.
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.
I think we need to update existing references to ensure that we have a single source of truth. Eg. We should use datePickerFormat
here to determine the date-picker type.
Seems like only the date is going through at the moment (when the input was both date and time), trying to fix it now. |
4381b2a
to
0b9fe7c
Compare
@NethmiRodrigo can you attach a video or GIF demonstrating a scenario where the date-picker type is set to "timer" in enter vs edit mode? |
333c40a
to
cfec3b2
Compare
@samuelmale updated the description with a screen recording of submitting and editing |
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.
LGTM, thanks @NethmiRodrigo!
Is the consensus that we're keeping the |
It's fair to treat |
This is related to this openmrs/openmrs-esm-core#1041. The |
I've restored the |
Hi @denniskigen @NethmiRodrigo @samuelmale sorry for tagging you all, but I'm not sure what the corresponding PR for this is in the form-builder repo; we will need this into the form-builder to render the time picker, correct? |
Requirements
Summary
This PR aims to support the rendering of a time picker alongside the date picker based on the prop
datePickerFormat
. If the prop is null, only the date picker will be displayed.Screenshots
Submitting values
Screen.Recording.2024-06-12.at.11.56.03.AM.mov
Editing time
Screen.Recording.2024-06-12.at.11.57.03.AM.mov
Related Issue
JIRA ticket
Other
PR to update prop name