Skip to content

Commit f46523f

Browse files
committed
Fix "Failed prop type: DateTimePicker: prop type portalContainer is invalid" error
1 parent 4a4a1c1 commit f46523f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/DateTimePicker.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,6 @@ DateTimePicker.propTypes = {
662662
onClockOpen: PropTypes.func,
663663
onFocus: PropTypes.func,
664664
openWidgetsOnFocus: PropTypes.bool,
665-
portalContainer: isBrowser ? PropTypes.instanceOf(HTMLElement) : undefined,
666665
required: PropTypes.bool,
667666
secondAriaLabel: PropTypes.string,
668667
secondPlaceholder: PropTypes.string,
@@ -672,4 +671,8 @@ DateTimePicker.propTypes = {
672671
yearPlaceholder: PropTypes.string,
673672
};
674673

674+
if (isBrowser) {
675+
DateTimePicker.propTypes.portalContainer = PropTypes.instanceOf(HTMLElement);
676+
}
677+
675678
export default DateTimePicker;

0 commit comments

Comments
 (0)