inveniosoftware / inveniosoftware/react-invenio-forms

DatePicker widget

Open
#185 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Screenshot 2023-01-19 at 13 37 28

We need a date widget to be added for DateField, like the one represented on the screenshot.

Existing widgets are already available in the react-invenio-forms. The new widget component must follow the same interface structure as the existing ones - so that it can be also reused in the future - some of the modules are expecting the same props in all the defined widgets.

# History

From https://github.com/inveniosoftware/invenio-administration/issues/149

## DatePicker postponed as it needs more investigation.

I've tried to use the the same module ([`semantic-ui-calendar-react`](https://github.com/arfedulov/semantic-ui-calendar-react)) used in [`ils`](https://github.com/inveniosoftware/react-invenio-app-ils/blob/f5063e405ecab33c1ee7d1dcd8d9df17fe89e24c/src/lib/components/DatePicker/DatePicker.js), but it seems to not be working in `react-invenio-forms`.

I'm getting some weird errors in the imported component that I've not been able to solve:

![Image](https://user-images.githubusercontent.com/21052053/212714139-734e4c46-dc07-4951-8ca2-4d95316533a8.png)
Everything looks fine in the `` component, so maybe it's not compatible (the latest commit in this module was in 2019, so it doesn't seem to be maintained).

### Possible other modules we can use

- [react-semantic-ui-datepickers](https://www.npmjs.com/package/react-semantic-ui-datepickers)
- Has semantic ui theming out of the box
- [react-dates](https://www.npmjs.com/package/react-dates)
- The AirBnb date picker, also used in [indico](https://indico.cern.ch/rooms/book), see code [here](https://github.com/indico/newdle/blob/7e9c1ca0375a72a9f83c425dc76ed42e6ea31b57/newdle/client/src/components/common/Calendar.js).
- See the Storybook [here](http://react-dates.github.io/react-dates/?path=/story/daterangepicker-drp--default)
- Does not have semantic-ui styling, but maybe it can be overridden somehow?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.