-
Notifications
You must be signed in to change notification settings - Fork 647
fix: add DatePicker support for custom Date/Datetime fields in UniInput #2811
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
base: develop
Are you sure you want to change the base?
fix: add DatePicker support for custom Date/Datetime fields in UniInput #2811
Conversation
|
Hi @samarth93, I think this PR will close #2670, right? |
|
@KerollesFathy Yes, this PR fixes both #2669 and #2670 since #2670 is a tracking issue for #2669. The fix adds DatePicker and DateTimePicker support to the UniInput component, which is used in the new ticket form for custom fields. This resolves the issue where Date and Datetime fields were rendering as plain text inputs. Changes made:
Both issues should be resolved with this PR |
Ok, I will close the PR 👍🏼 |
desk/src/components/UniInput.vue
Outdated
| import { parseApiOptions } from "@/utils"; | ||
| import { createResource, FormControl } from "frappe-ui"; | ||
| import { createResource, DateTimePicker, dayjs, FormControl } from "frappe-ui"; | ||
| import DatePicker from "frappe-ui/src/components/DatePicker/DatePicker.vue"; |
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.
import from frappe-ui not like this
|
@samarth93 |
Fixes frappe#2669 Custom Date and Datetime fields on the new ticket form were rendering as plain text inputs instead of proper DatePicker/DateTimePicker components. Changes: - Import DatePicker and DateTimePicker from frappe-ui - Add handling for 'Date' fieldtype to render DatePicker component - Add handling for 'Datetime' fieldtype to render DateTimePicker component - Add date formatting in transValue for proper display
41b71d0 to
f5712e0
Compare
|
@RitvikSardana The workflow is waiting for the approval. Can you approve so I can see if everything is working fine? |
Fixes #2669
Custom Date and Datetime fields on the new ticket form were rendering as plain text inputs instead of proper DatePicker/DateTimePicker components.
Changes: