Compare commits

...

2 Commits

Author SHA1 Message Date
LiuJiaNan ac5d882910 feat(utils): 优化validatorEndTime 2026-04-15 15:36:27 +08:00
LiuJiaNan 66c058f911 1.2.33 2026-04-15 15:35:25 +08:00
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
{
"name": "zy-react-library",
"private": false,
"version": "1.2.32",
"version": "1.2.33",
"type": "module",
"description": "",
"author": "LiuJiaNan",

View File

@ -494,9 +494,9 @@ export function validatorEndTime(options) {
if (!value || !timeStart)
return Promise.resolve();
const dateOnlyRegex = /^\d{4}-\d{2}-\d{2}$/;
const dateTimeRegex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/;
if (!type) {
const dateOnlyRegex = /^\d{4}-\d{2}-\d{2}$/;
const dateTimeRegex = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/;
if (dateOnlyRegex.test(timeStart))
type = "date";
else if (dateTimeRegex.test(timeStart))