Skip to content

Commit

Permalink
chore: fix react warnings in datepicker (#2063)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelol authored Feb 4, 2025
1 parent 2942aa3 commit f629ab9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/components/DatePicker/DatePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class DatePicker extends Component {
<input
value={this.getDisplayValue(value)}
className="form-control"
readOnly={true}
placeholder={this.getDisplayValue(value)}
/>
{onClear && (
Expand Down Expand Up @@ -101,7 +102,10 @@ class DatePicker extends Component {

DatePicker.propTypes = {
label: PropTypes.string,
value: PropTypes.string,
value: PropTypes.oneOfType([
PropTypes.string,
PropTypes.instanceOf(Date)
]),
onChange: PropTypes.func,
showDateTimeInput: PropTypes.bool,
showTimeInput: PropTypes.bool,
Expand Down

0 comments on commit f629ab9

Please sign in to comment.