File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
packages/editor/src/components/post-schedule Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change 44import { __experimentalGetSettings } from '@wordpress/date' ;
55import { useDispatch , useSelect } from '@wordpress/data' ;
66import { __experimentalPublishDateTimePicker as PublishDateTimePicker } from '@wordpress/block-editor' ;
7- import { useRef , useState , useMemo } from '@wordpress/element' ;
7+ import { useState , useMemo } from '@wordpress/element' ;
88import { store as coreStore } from '@wordpress/core-data' ;
99
1010/**
@@ -61,7 +61,6 @@ export default function PostSchedule( { onClose } ) {
6161 [ eventsByPostType ]
6262 ) ;
6363
64- const ref = useRef ( ) ;
6564 const settings = __experimentalGetSettings ( ) ;
6665
6766 // To know if the current timezone is a 12 hour time with look for "a" in the time format
@@ -75,17 +74,10 @@ export default function PostSchedule( { onClose } ) {
7574 . join ( '' ) // Reverse the string and test for "a" not followed by a slash.
7675 ) ;
7776
78- function onChange ( newDate ) {
79- onUpdateDate ( newDate ) ;
80- const { ownerDocument } = ref . current ;
81- ownerDocument . activeElement . blur ( ) ;
82- }
83-
8477 return (
8578 < PublishDateTimePicker
86- ref = { ref }
8779 currentDate = { postDate }
88- onChange = { onChange }
80+ onChange = { onUpdateDate }
8981 is12Hour = { is12HourTime }
9082 events = { events }
9183 onMonthPreviewed = { setPreviewedMonth }
You can’t perform that action at this time.
0 commit comments