From 65f3c556a976bd70a01f43bca683755af2a6b397 Mon Sep 17 00:00:00 2001 From: Andy Meerwaldt Date: Tue, 30 Mar 2021 09:46:38 +0200 Subject: [PATCH] Use the set date instead of getDate() --- packages/schema-blocks/src/instructions/blocks/Date.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/schema-blocks/src/instructions/blocks/Date.tsx b/packages/schema-blocks/src/instructions/blocks/Date.tsx index 8cea35ca0f..c7d549ad0f 100644 --- a/packages/schema-blocks/src/instructions/blocks/Date.tsx +++ b/packages/schema-blocks/src/instructions/blocks/Date.tsx @@ -2,7 +2,7 @@ import { BlockConfiguration } from "@wordpress/blocks"; import { DateTimePicker, Dropdown } from "@wordpress/components"; import { createElement, useState } from "@wordpress/element"; -import { __experimentalGetSettings, dateI18n, getDate, format } from "@wordpress/date"; +import { __experimentalGetSettings, dateI18n, format } from "@wordpress/date"; import { __ } from "@wordpress/i18n"; // Internal imports. @@ -36,7 +36,7 @@ export default class Date extends BlockInstruction { let currentValue = __( "Select a date", "yoast-schema-blocks" ); if ( attributes[ this.options.name ] ) { - currentValue = format( "Y-m-d", getDate() ); + currentValue = format( "Y-m-d", attributes[ this.options.name ] ); } /**