Skip to content

Commit

Permalink
feat: added format fallback to date input in ui package (#2736)
Browse files Browse the repository at this point in the history
  • Loading branch information
chesterkmr committed Sep 30, 2024
1 parent 6e4780a commit 198e9d7
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 55 deletions.
2 changes: 2 additions & 0 deletions apps/kyb-app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Patch Changes

- Updated dependencies
- @ballerine/ui@0.5.34
- Bump
- Updated dependencies
- @ballerine/blocks@0.2.20
Expand Down
1 change: 1 addition & 0 deletions packages/react-pdf-toolkit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Patch Changes

- Updated dependencies
- Bump
- Updated dependencies
- @ballerine/config@1.1.18
Expand Down
1 change: 1 addition & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Patch Changes

- Added fallback date format to date input
- Bump
- Updated dependencies
- @ballerine/common@0.9.34
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,17 @@ export const DatePickerInput = ({
return value.toISOString();
}

return value.format(outputValueFormat);
const date = value.format(outputValueFormat);

if (!dayjs(date).isValid()) {
console.warn(
`Invalid outputValueFormat: "${outputValueFormat}" provided. iso will be used.`,
);

return value.toISOString();
}

return date;
},
[outputValueFormat],
);
Expand Down
106 changes: 53 additions & 53 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/workflows-service/prisma/data-migrations

0 comments on commit 198e9d7

Please sign in to comment.