Skip to content

🎥 Make videos programmatically with React

explain that date is in local format

Jonny Burgercc9f98d5afd4
diff --git a/packages/cli/src/editor/components/RenderModal/SchemaEditor/ZodDateEditor.tsx b/packages/cli/src/editor/components/RenderModal/SchemaEditor/ZodDateEditor.tsx
index ec05c6f7b3..ff01ff82e6 100644
--- a/packages/cli/src/editor/components/RenderModal/SchemaEditor/ZodDateEditor.tsx
+++ b/packages/cli/src/editor/components/RenderModal/SchemaEditor/ZodDateEditor.tsx
@@ -1,5 +1,6 @@
import React, {useCallback, useState} from 'react';
import type {z} from 'remotion';
+import {LIGHT_TEXT} from '../../../helpers/colors';
import {Spacing} from '../../layout';
import {RemotionInput} from '../../NewComposition/RemInput';
import {ValidationMessage} from '../../NewComposition/ValidationMessage';
@@ -16,6 +17,12 @@ const fullWidth: React.CSSProperties = {
width: '100%',
};
+const explainer: React.CSSProperties = {
+ fontFamily: 'sans-serif',
+ fontSize: 12,
+ color: LIGHT_TEXT,
+};
+
// This will do 2 things:
// - Make the calendar icon white
// Turn the input popup a dark mode input
@@ -124,6 +131,8 @@ export const ZodDateEditor: React.FC<{
onChange={onChange}
style={inputStyle}
/>
+ <Spacing y={1} block />
+ <div style={explainer}>Date is in local format</div>
{!localValue.zodValidation.success && (
<>
<Spacing y={1} block />
diff --git a/packages/example/src/Video.tsx b/packages/example/src/Video.tsx
index 5b9013ef23..9203cee3b0 100644
--- a/packages/example/src/Video.tsx
+++ b/packages/example/src/Video.tsx
@@ -720,7 +720,7 @@ export const Index: React.FC = () => {
yo: {hi: ' there'},
un: 'hi',
num: '179',
- date: new Date('2022-01-08T03:10:00.000Z'),
+ date: new Date('2022-01-08T21:10:00.000Z'),
}}
durationInFrames={150}
/>