Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
DatePicker: cleanup example, propTypes
Browse files Browse the repository at this point in the history
  • Loading branch information
psealock committed Dec 21, 2018
1 parent 12bec92 commit 8f7b340
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions packages/components/src/calendar/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ const MyDateRange = withState( {
onUpdate={ onDatePickerUpdate }
dateFormat={ dateFormat }
invalidDays="none"
onUpdate={ onDatePickerUpdate }
invalidDays="future"
/>
</Section>
</div>
Expand Down
4 changes: 3 additions & 1 deletion packages/components/src/calendar/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
import { Dashicon, Popover } from '@wordpress/components';
import classnames from 'classnames';
import { uniqueId } from 'lodash';
import { uniqueId, noop } from 'lodash';
import PropTypes from 'prop-types';

const DateInput = ( {
Expand Down Expand Up @@ -63,11 +63,13 @@ DateInput.propTypes = {
error: PropTypes.string,
errorPosition: PropTypes.string,
onFocus: PropTypes.func,
onKeyDown: PropTypes.func,
};

DateInput.defaultProps = {
onFocus: () => {},
errorPosition: 'bottom center',
onKeyDown: noop,
};

export default DateInput;

0 comments on commit 8f7b340

Please sign in to comment.