Skip to content

Conversation

@LukasBoll
Copy link
Contributor

add Documentation for Date and Time Picker

closes #196

Signed-off-by: Lukas Boll [email protected]

@sdirix sdirix requested a review from TheZoker September 8, 2021 07:09
Copy link
Contributor

@TheZoker TheZoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only small notes

Thanks!

</TableBody>
</Table>
</div>
); No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new line at the end of the file

@LukasBoll
Copy link
Contributor Author

Thanks for the review, I applied your suggestions and updated the Pull request.

Copy link
Contributor

@TheZoker TheZoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks 🎉

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already looks good!

We're mainly missing on how to customize the locale in each picker's modal. Here is the example in our example app: https://github.com/eclipsesource/jsonforms/blob/5da2f0d3afcecc9e2e663ec1238d08ad046dac80/packages/example/src/index.tsx#L44-L47

Please add a separate section where it is explained how to set the global dayjs locale. Ideally with a demo where you can switch between german and english locale like in the example above. Also mention that the dayjs locale customization is React Material only.

Otherwise I went into a lot of detailed comments for the first section. Please apply the feedback also to the remaining sections.

There are two ways to integrate the Time Picker. It can be embedded via the schema or the UI schema. The Time Picker supports a variety of options, that can be configured in the UI schema.

### Schema Based
An Input Field will be displayed as Time Picker by setting the format of the corresponding field to “time” in the schema.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some weird quotations marks here

@LukasBoll LukasBoll force-pushed the documentDatePicker branch 3 times, most recently from aa7d5ec to a913a57 Compare September 22, 2021 21:15
<MenuItem value={'en'}>en</MenuItem>
<MenuItem value={'de'}>de</MenuItem>
</Select>
{reloadJsForms===true?<ReloadJsonForms data = {data}reload={()=>{setreloadJsForms(false)}}/>:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To change the language, it is not enough to rerender this component or to render JsonForms with different probs, because some components don’t get rerendered/updated. I removed Jsonforms from the DOM just to add it again, this way everything gets updated.

@LukasBoll LukasBoll requested a review from sdirix September 22, 2021 21:30
Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@sdirix sdirix merged commit 07c73c5 into eclipsesource:master Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the new date pickers

3 participants