I managed to find the solution myself. You need to modify the onUpdateStartDate()
function:
function onUpdateStartDate(value) {
const date = new Date(value);
date.setHours(0, 0, 0, 0);
setMeta({ ...meta, '_my_start_date': date });
}
Related Posts:
- How to add more elements to an already existing section in Gutenberg
- Working with a non-React external library in a custom block
- Masonry gallery block is working in the block editor but not the template editor
- How to import the imagesLoaded and Masonry libs that come with WP in a Gutenberg block?
- Implementation of React-Datepicker component with Gutenberg in WordPress
- Embedded data and the _fields parameter in getEntityRecords
- Force-update the meta variable first set using `var [ meta, setMeta = useEntityProp( ‘postType’, postType, ‘meta’ );`
- How to build BOTH non-block components and blocks present in the /src directory using @wordpress/scripts
- How to add an additional dependency to a block index.asset.php file
- Why is the Gutenberg editor not recognizing my updates?
- How to transform a shortcode into a block
- How to re-render Gutenberg component when object instance is available
- useSelect() plus resolver result is serving cached data incorrectly
- How to render HTML content using the Interactivity API?
- Extend WordPress Gutenberg core/navigation-link
- How to auto rename JS files to prevent browser cache issues
- How to render initial posts on page load in a Gutenberg block using the Interactivity API?
- How to format a JavaScript date
- How to format a JavaScript date
- How do I get the current date in JavaScript?
- Get String in YYYYMMDD format from JS date object?
- Compare two dates with JavaScript
- Compare dates with javascript
- Add days to JavaScript Date
- Parsing a string to a date in JavaScript
- Format JavaScript date as yyyy-mm-dd
- ChangeDate – Date Picker Bootstrap
- Add days to JavaScript Date
- How to validate date with format “mm/dd/yyyy” in JavaScript?
- How to subtract date/time in JavaScript?
- Getting current date and time in JavaScript
- Shortest way to print current year in a website
- Validate date in dd/mm/yyyy format using JQuery Validate
- How to subtract days from a plain Date?
- How to add 30 minutes to a JavaScript Date object?
- How do you convert a JavaScript date to UTC?
- Convert UTC Epoch to local date
- Convert normal date to unix timestamp
- Check time difference in Javascript
- How to convert date to timestamp?
- How to format a UTC date as a `YYYY-MM-DD hh:mm:ss` string using NodeJS?
- Moment Js UTC to Local Time
- Get hours difference between two dates in Moment Js
- Javascript: getFullyear() is not a function
- Trigger Javascript on Gutenberg (Block Editor) Save
- Gutenberg – remove / add blocks with custom script
- What are all the query parameters for getEntityRecords?
- How to use wp.hooks.addAction() in React JS/Gutenberg?
- How to only enqueue block javascript on the frontend when its needed [duplicate]
- Extend core block in Gutenberg
- Show control conditionally in Gutenberg
- Gutenberg custom block plugin with custom image sizes
- Get loading state of wp data selector
- How to get the ToggleControl Gutenberg component working for a PHP Block
- Is there a core Sortable component in Gutenberg?
- Hooking a callback into the code within a Gutenberg block
- conditional layout based on if Innerblocks is not empty
- Gutenberg extend blocks add new class name
- initial open/toggle PluginDocumentSettingPanel panel in document setting block editor gutenberg
- Is there an equivalent of the PHP function sanitize_key in Gutenberg?
- WordPress Gutenberg Ajax request
- WP Gutenberg – custom block with two content fields
- How do I make a savable preview like Youtube Gutenberg block?
- Gutenberg Edit Block Inspector Controls and save
- Spans in gutenberg
- iFrame onLoad in custom Gutenberg block
- Block pattern conflict with custom block
- WordPress Gutenberg: Attribute overwritten by block duplicate
- Table block variation with header section activated
- Filtering Gutenberg Components, not Blocks
- Where to include JS library in gutenberg blocks
- How to delete child block for associated parent block
- Passing object to FormTokenField suggestions
- How to detect if we are in the Site Editor part of the Block Editor (as opposed to editing a Page/Post) in JavaScript?
- How can I show a Slot/Fill in the block editor
- Is it possible to add javascript to template parts
- How to add a new attribute to core wp block editor without npm?
- How do i get an Inline style in Gutenberg Block show up in front end?
- WordPress adds and tags into HTML blocks after saving
- How do i fix type error
- Gutenberg core/file add style support in js/ json
- Create Youtube embed block with createBlock
- How to add a css class to postTitleWrapper in Gutenberg?
- How to change the selected Template using javascript?
- Event when Modal is opened/visible
- Additional CSS classes not being added in Gutenberg editor
- How do I filter/modify the updated content on save using javascript?
- config @wordpress/scripts with webpack and postCSS features
- Jest Unit tests for High order component containing Block Editor
- Separate typography controls for titles and meta in a custom block?
- Include Block Variation Within InnerBlocks
- Gutenberg block: add a multi-select for posts
- Cannot call a class as a function in block plugin react component
- How to execute some javascript code in the editor when a block pattern is added?
- useBlockProps() nests wrapper with class name inside block wrapper in the editor
- configure additonal build files in the @wordpress/create-block
- Metabox conditionals depending on post format and template in Gutenberg
- How to access current discussion settings in gutenberg via JS?
- Why Is wp.editor Not Adding the ”Add Media” Button When I Initialize It?
- How to get selected category objects in the block editor?