diff --git a/src/components/DatePicker/datepickerPropTypes.js b/src/components/DatePicker/datepickerPropTypes.js index 4a681ec90c4..78db5e14d7c 100644 --- a/src/components/DatePicker/datepickerPropTypes.js +++ b/src/components/DatePicker/datepickerPropTypes.js @@ -18,15 +18,11 @@ const propTypes = { * `onInputChange` would always be called with a Date (or null) */ defaultValue: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.string]), - - /* Restricts for selectable max date range for the picker */ - maximumDate: PropTypes.instanceOf(Date), }; const defaultProps = { ...defaultFieldPropTypes, value: undefined, - maximumDate: undefined, }; export {propTypes, defaultProps}; diff --git a/src/components/DatePicker/index.android.js b/src/components/DatePicker/index.android.js index 813bf517d08..e034af725c1 100644 --- a/src/components/DatePicker/index.android.js +++ b/src/components/DatePicker/index.android.js @@ -65,7 +65,6 @@ class DatePicker extends React.Component { value={this.props.value || this.props.defaultValue ? moment(this.props.value || this.props.defaultValue).toDate() : new Date()} mode="date" onChange={this.setDate} - maximumDate={this.props.maximumDate} /> )} diff --git a/src/components/DatePicker/index.ios.js b/src/components/DatePicker/index.ios.js index b3badbde42c..062134ea468 100644 --- a/src/components/DatePicker/index.ios.js +++ b/src/components/DatePicker/index.ios.js @@ -116,7 +116,6 @@ class DatePicker extends React.Component { themeVariant="dark" onChange={this.updateLocalDate} locale={this.props.preferredLocale} - maximumDate={this.props.maximumDate} /> diff --git a/src/components/DatePicker/index.js b/src/components/DatePicker/index.js index 9f3c93a5060..2983ce7620b 100644 --- a/src/components/DatePicker/index.js +++ b/src/components/DatePicker/index.js @@ -31,9 +31,6 @@ class DatePicker extends React.Component { // Adds nice native datepicker on web/desktop. Not possible to set this through props this.inputRef.setAttribute('type', 'date'); this.inputRef.classList.add('expensify-datepicker'); - if (this.props.maximumDate) { - this.inputRef.setAttribute('max', moment(this.props.maximumDate).format(CONST.DATE.MOMENT_FORMAT_STRING)); - } } /** diff --git a/src/pages/EnablePayments/AdditionalDetailsStep.js b/src/pages/EnablePayments/AdditionalDetailsStep.js index 1a90a8a3518..998aa93795d 100644 --- a/src/pages/EnablePayments/AdditionalDetailsStep.js +++ b/src/pages/EnablePayments/AdditionalDetailsStep.js @@ -354,7 +354,6 @@ class AdditionalDetailsStep extends React.Component { defaultValue={this.props.walletAdditionalDetailsDraft.dob || ''} placeholder={this.props.translate('common.dob')} errorText={this.getErrorText('dob') || this.getErrorText('age')} - maximumDate={new Date()} /> diff --git a/src/pages/ReimbursementAccount/IdentityForm.js b/src/pages/ReimbursementAccount/IdentityForm.js index 95994b73d7f..149489d613b 100644 --- a/src/pages/ReimbursementAccount/IdentityForm.js +++ b/src/pages/ReimbursementAccount/IdentityForm.js @@ -169,7 +169,6 @@ const IdentityForm = (props) => { defaultValue={props.values.dob || props.defaultValues.dob} onInputChange={value => props.onFieldChange({dob: value})} errorText={dobErrorText} - maximumDate={new Date()} />