Skip to content

Commit

Permalink
[New #26] Add parameterization for date picker format
Browse files Browse the repository at this point in the history
  • Loading branch information
LaChope committed Dec 7, 2023
1 parent 5070ca3 commit 5db71d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/components/record/RecordForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ class RecordForm extends React.Component {
...this._getUsersOptions(),
...this._getIconsOptions()
}
const componentsOptions= {
dateTimeAnswer: {
dateFormat: "dd-MM-yy",
timeFormat: "HH:mm",
dateTimeFormat: "dd-MM-yy HH:mm:ss",
},
}

if (this.props.formgen.status === ACTION_STATUS.ERROR) {
return <AlertMessage
Expand All @@ -128,6 +135,7 @@ class RecordForm extends React.Component {
form={this.state.form}
formData={this.props.record.question}
options={options}
componentsOptions={componentsOptions}
fetchTypeAheadValues={this.fetchTypeAheadValues}
isFormValid={this.props.isFormValid}
enableForwardSkip={true}
Expand Down

0 comments on commit 5db71d8

Please sign in to comment.