Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/dataviews/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Enhancements

- Dataform: Sort day, month, and year of `DateTime` control according to locale. [#/](https://github.com/WordPress/gutenberg/pull//)

### Breaking changes

- Remove `boolean` form control. Fields using `Edit: 'boolean'` must now use `Edit: 'checkbox'` or `Edit: 'toggle'` instead. Boolean field types now use checkboxes by default. [#71505](https://github.com/WordPress/gutenberg/pull/71505)
Expand Down
5 changes: 5 additions & 0 deletions packages/dataviews/src/dataform-controls/datetime.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
import { _x } from '@wordpress/i18n';
import { BaseControl, TimePicker, VisuallyHidden } from '@wordpress/components';
import { useCallback } from '@wordpress/element';

Expand Down Expand Up @@ -55,6 +56,10 @@ export default function DateTime< Item >( {
currentTime={ typeof value === 'string' ? value : undefined }
onChange={ onChangeControl }
hideLabelFromVision
dateOrder={
/* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */
_x( 'dmy', 'date order' ) as 'dmy' | 'mdy' | 'ymd'
}
/>
</fieldset>
);
Expand Down
Loading