Skip to content

Commit

Permalink
Remove obsolete props being passed through to DatePicker component (#…
Browse files Browse the repository at this point in the history
…11649)

* remove unnecessary locale and is12Hour passthru props to DatePicker component

* add changelog entries
  • Loading branch information
nerrad authored Nov 12, 2018
1 parent 992a43c commit 0c734e1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
4 changes: 4 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

## 5.1.0 (2018-11-09)

### Polish

- Remove `<DateTimePicker />` obsolete `locale` prop (and pass-through to child components) and obsolete `is12Hour` prop pass through to `<DateTime />` [#11649](https://github.com/WordPress/gutenberg/pull/11649)

### New Feature

- Adjust a11y roles for MenuItem component, so that aria-checked is used properly, related change in Editor/Components/BlockNavigationList ([#11431](https://github.com/WordPress/gutenberg/issues/11431)).
Expand Down
8 changes: 0 additions & 8 deletions packages/components/src/date-time/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const MyDateTimePicker = withState( {
<DateTimePicker
currentDate={ date }
onChange={ ( date ) => setState( { date } ) }
locale={ settings.l10n.locale }
is12Hour={ is12HourTime }
/>
);
Expand All @@ -55,13 +54,6 @@ The function called when a new date or time has been selected. It is passed the
- Required: No
- Default: `noop`

### locale

The localization for the display of the date and time.

- Type: `string`
- Required: No

### is12Hour

Whether we use a 12-hour clock. With a 12-hour clock, an AM/PM widget is displayed and the time format is assumed to be MM-DD-YYYY.
Expand Down
4 changes: 1 addition & 3 deletions packages/components/src/date-time/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class DateTimePicker extends Component {
}

render() {
const { currentDate, is12Hour, locale, onChange } = this.props;
const { currentDate, is12Hour, onChange } = this.props;

return (
<div className="components-datetime">
Expand All @@ -48,8 +48,6 @@ export class DateTimePicker extends Component {
<DatePicker
currentDate={ currentDate }
onChange={ onChange }
locale={ locale }
is12Hour={ is12Hour }
/>
</Fragment>
) }
Expand Down
4 changes: 4 additions & 0 deletions packages/editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@

## 6.2.0 (2018-11-09)

### Polish

- Remove unnecessary `locale` prop usage [#11649](https://github.com/WordPress/gutenberg/pull/11649)

### New Features

- Adjust a11y roles for menu items, and make sure screen readers can properly use BlockNavigationList ([#11431](https://github.com/WordPress/gutenberg/issues/11431)).
Expand Down
1 change: 0 additions & 1 deletion packages/editor/src/components/post-schedule/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export function PostSchedule( { date, onUpdateDate } ) {
key="date-time-picker"
currentDate={ date }
onChange={ onUpdateDate }
locale={ settings.l10n.locale }
is12Hour={ is12HourTime }
/>
);
Expand Down

0 comments on commit 0c734e1

Please sign in to comment.