DateTime




register_post_meta( 'post_type_name', 'test_date', array(
'type' => 'string',
'default' => '2025-12-30',
'single' => true,
'show_in_rest' => true,
) );register_post_meta( 'post_type_name', 'test_datetime', array(
'type' => 'string',
'default' => '2025-12-30',
'single' => true,
'show_in_rest' => true,
) );import {
TwebMetaDateTimeControl,
} from '@tigriweb/components/meta';<TwebMetaDateTimeControl
label={ __('Date Label', 'your-theme-name') }
help={ __('Date Description', 'your-theme-name') }
labelButtonText={ __('Select Date', 'your-theme-name') }
type="date"
name="test_date"
{...{ attributes, setAttributes }}
/><TwebMetaDateTimeControl
label={ __('Datetime Label', 'your-theme-name') }
help={ __('Datetime Description', 'your-theme-name') }
labelButtonText={ __('Select Datetime', 'your-theme-name') }
name="test_datetime"
{...{ attributes, setAttributes }}
/>Last updated
Was this helpful?