By default the date/time picker does not display the time or allow users to specify a time; when selecting a date, the time component will default to “Now”. Here is how we can enable the time picker:
- Click LOG IN to login to the drawing tool.
- Select the API tab.
- Copy-paste api/draw/1/element/page/{id} in the address bar. Replace {id} with the ID of the page layout that contains the date picker that you want to edit. (In this example, the ID is 733db4f3-86e2-4724-8543-dcbd2e000258.
- Click GET. This fetches the metadata, and you will get the message GET to api/draw/1/element/page/733db4f3-86e2-4724-8543-dcbd2e000258 completed successfully.
- Copy-and-paste the JSON from the Response pane to the Request pane.
- Locate the JSON for the relevant date picker (it will be in the pageComponents array).
- Edit the attributes property to the following:
"attributes"
: {
"dateTimeLocale"
:
"en-us"
,
"dateTimeFormat"
:
"MM/DD/YYYY hh:mm:ss"
}
- Copy-paste api/draw/1/element/page in the address bar.
- Click POST. This save the updated version of the page. We will get the message POST to api/draw/1/element/page completed successfully.
Note //The time picker is displayed when a time component exists in the format string (For example, hh:ss).
|