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 do I get the current date in JavaScript?
- Get String in YYYYMMDD format from JS date object?
- Compare dates with javascript
- Add days to JavaScript Date
- Parsing a string to a date in JavaScript
- Getting current date and time in JavaScript
- How do you convert a JavaScript date to UTC?
- Convert normal date to unix timestamp
- Moment Js UTC to Local Time
- Get hours difference between two dates in Moment Js
- 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
- Gutenberg custom block plugin with custom image sizes
- Get loading state of wp data selector
- 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
- Correctly handling WordPress core data retrieval in Gutenberg
- Is there a client side API for handling transients or options?
- Adding a text element in between title and blocks container
- Gutenberg RichText
- Use useSelect/useDispatch instead of withSelect/withDispatch
- How to handle Gutenberg wp.data async errors?
- How to use wp.hooks.addAction() in React JS/Gutenberg?
- Load script after block is inserted
- How do I access site and block editor state data and use `useSelect()` or `withSelect()` to bind it to my components?
- Min And Max Date With Date Format In Elementor Form Not Working
- Block Editor: How to get title and post content within the WordPress admin UI in Javascript?
- Custom block SelectControl works but equivalent ComboboxControl gives errors – where’s my mistake?
- Gutenberg add extra attributes to custom format
- event/callback on block update?
- How to disable inline css styles generated by Gutenberg editor?
- Gutenberg getMedia() in post query doesn’t return all featured images
- How to transform a legacy widget into a block
- Add A Tag To A Post Through JavaScript In Gutenberg UI?
- Gutenberg select categories
- How to return div with custom attributes(Coding a Gutenberg Block)
- What is the correct way to import the blocks-editor?
- Open MediaUpload from external component in Gutenberg
- Gutenberg extend blocks add new class name
- Search for a keyword across post types in a Gutenberg component
- Using apiFetch for retrieving post data in Gutenberg
- Looping over wordpress meta to create “ ‘s?
- How to display post content in the block editor
- How to load an additional script for a block in the block editor?
- Gutenberg consume wp-json data and reflect in frontend the content
- Gutenberg getBlockIndex in save() function
- Widgets and Post/Page edit/new blank, console errors only, no server errors
- Gutenberg richtext block vaildation failed
- Conditional save return on Gutenberg Block
- Can I alter the block editor’s paste text behavior?
- How to read inline-CSS from Gutenberg block?
- Gutenberg RangeControl
- Custom Gutenberg block: access dom element via JavaScript
- Custom Block – save.js function not saving attributes
- Add a Page Screen is Visually Blank
- Including dependencies using @wordpress/dependency-extraction-webpack-plugin
- Gutenberg sidebar show input field on toggle
- Get the ID of a page in Parent combobox in editor
- Uncaught TypeError: r is not a function
- WP Gutenberg – custom block with two content fields
- How do I make a savable preview like Youtube Gutenberg block?
- iFrame onLoad in custom Gutenberg block
- WordPress Gutenberg: Attribute overwritten by block duplicate
- Table block variation with header section activated
- Filtering Gutenberg Components, not Blocks
- How to delete child block for associated parent block
- Passing object to FormTokenField suggestions
- 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
- Event when Modal is opened/visible
- 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
- 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?