Skip to content

Commit 9ab7924

Browse files
committed
DatePicker fixes
1 parent 564ff14 commit 9ab7924

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

custom-component-library/components/DatePicker/definition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const DatePickerDefinition: CustomNodeDefinition<DatePickerCustomProps> =
2121
// Condition is a regex to match ISO strings
2222
condition: ({ value }) =>
2323
typeof value === 'string' &&
24-
/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:?\d{2})?)?$/.test(value),
24+
/^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})?)?$/.test(value),
2525
element: DateTimePicker,
2626
showOnView: true,
2727
showOnEdit: true,

demo/src/demoData/dataDefinitions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ export const demoDataDefinitions: Record<string, DemoData> = {
714714
...DatePickerDefinition,
715715
showOnView: true,
716716
showInTypesSelector: true,
717-
customNodeProps: { showTimeSelect: false, dateFormat: 'MMM d, yyyy' },
717+
customNodeProps: { showTime: false, dateFormat: 'MMM d, yyyy' },
718718
},
719719
// Uncomment to test a custom Collection node
720720
// {

0 commit comments

Comments
 (0)