📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-21 10:31:04
📂
/ (Root)
/
home
/
xeqi7597
/
cds.claireduwig.com
/
wp-content
/
plugins
/
generateblocks
/
src
/
blocks
/
query
/
components
📍 /home/xeqi7597/cds.claireduwig.com/wp-content/plugins/generateblocks/src/blocks/query/components
🔄 Refresh
✏️
Editing: DateTimeControl.jsx
Writable
import { BaseControl, DateTimePicker, TimePicker } from '@wordpress/components'; import clsx from 'clsx'; import { isValid } from 'date-fns'; import './editor.scss'; export function DateTimeControl( { id, label, help, value, onChange, className = '', calendar = false } ) { const currentDate = !! value ? new Date( value ) : ''; return ( <BaseControl id={ id } label={ label } help={ help } className={ clsx( 'gb-datetime-control', className ) } > { calendar ? ( <DateTimePicker currentDate={ isValid( currentDate ) ? currentDate : '' } onChange={ onChange } is12Hour={ true } /> ) : ( <TimePicker is12Hour={ true } currentTime={ isValid( value ) ? value : '' } onChange={ onChange } /> ) } </BaseControl> ); }
💾 Save Changes
❌ Cancel