Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[form-builder] Refactor DateTimeInput and add DateInput #756

Merged
merged 2 commits into from
Apr 26, 2018
Merged

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented Apr 24, 2018

This is a refactor of the DateTimeInput, and also adds a default DateInput for type: 'date' (this stores dates on the YYYY-MM-DD format, ignoring the time part).

I've basically moved the current DateTimeInput to a BaseDateTimeInput and made it possible to disable the time part of the datetime string with the onlyDate prop.

The DateTimeInput and DateInput wraps the BaseDateTimeInput, and passes down the relevant props.

This also includes a few consistency fixes and code cleanup (naming, unused code, etc).

@bjoerge bjoerge requested review from rexxars and thomax April 24, 2018 20:24
Copy link
Contributor

@thomax thomax left a comment

Choose a reason for hiding this comment

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

LGTM! Well done!

Would it be worthwhile to let the schema disable the datepicker widget? Use case: You dislike the datepicker and prefer a plain keyboard input.

@bjoerge
Copy link
Member Author

bjoerge commented Apr 25, 2018

Would it be worthwhile to let the schema disable the datepicker widget? Use case: You dislike the datepicker and prefer a plain keyboard input.

Good point. That could probably be solved by replacing it with the default string input component, or?

@thomax
Copy link
Contributor

thomax commented Apr 25, 2018

Good point. That could probably be solved by replacing it with the default string input component, or?

Absolutely!

@bjoerge bjoerge merged commit 718ee05 into next Apr 26, 2018
@bjoerge bjoerge deleted the add-date-input branch April 26, 2018 14:15
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.

2 participants