react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

Field with only hours

Open anthony-bernardo opened this issue 6 years ago • 3 comments

Prerequisites

  • [x] I have read the documentation;
  • [x] In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.

Description

I'm trying to set a hours fields. All I want is "date-time" field without the date. Only hours.

anthony-bernardo avatar Aug 29 '18 06:08 anthony-bernardo

You can build your own widget for hours. Inspire yourself by existing widgets and include your widget like this:

const widgets = { hours };
const uiSchema = {
 entityWithHours: { 'ui:widget': 'hours' } 
};
// ...
<Form widgets={widgets} {...} uiSchema={uiSchema} {...} />

Related docs.

MatejBransky avatar Aug 29 '18 12:08 MatejBransky

I would be willing to review a PR that added time widgets to match the datetime and date widgets.

glasserc avatar Sep 26 '18 16:09 glasserc

Related PR: #894

epicfaace avatar Jan 19 '19 02:01 epicfaace