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

[datetime2] feat(DateInput3): simpler formatting & parsing API #6398

Merged
merged 4 commits into from
Sep 21, 2023

Conversation

adidahiya
Copy link
Contributor

@adidahiya adidahiya commented Sep 20, 2023

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

  • feat(DateInput3): formatDate and parseDate props are now optional. The component will use a date-fns formatter & parser with a format string inferred from the time precision setting.
  • feat(DateInput3): new dateFnsFormat prop allows users to easily customize the date formatter, parser, and input placeholder without having to write custom formatting & parsing functions

Reviewers should focus on:

Test cases, no regressions in example

Screenshot

2023-09-20 13 55 18

@adidahiya
Copy link
Contributor Author

fix compilation

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

@adidahiya
Copy link
Contributor Author

formatting & parsing with dateFnsFormat seems to work fine in the docs example:

2023-09-21 11 17 23

@adidahiya adidahiya merged commit a4e517f into develop Sep 21, 2023
12 checks passed
@adidahiya adidahiya deleted the ad/date-input-format-utils branch September 21, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant