Skip to content

Commit

Permalink
fix: fix date format error. (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 29, 2023
1 parent 3d5dea4 commit 5e29314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/editor/value.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function ReValue<T extends object>(props: ReValueProps<T>) {
typeStr = 'undefined';
} else if (typeof text === 'string') {
try {
if (text && text.length > 10 && !isNaN(Date.parse(text))) {
if (text && text.length > 19 && !isNaN(Date.parse(text))) {
const dt = new Date(text);
text = dt;
typeStr = 'date';
Expand Down

0 comments on commit 5e29314

Please sign in to comment.