Browse Source

test: add displayValue on calendar demo, avoid chromatic snapshot invalid

pointhalo 2 years ago
parent
commit
bc6a4bd1e1
1 changed files with 1 additions and 8 deletions
  1. 1 8
      packages/semi-ui/calendar/_story/calendar.stories.jsx

+ 1 - 8
packages/semi-ui/calendar/_story/calendar.stories.jsx

@@ -563,14 +563,7 @@ export const WeekStartsOnDemo = () => {
                 mode="month"
                 weekStartsOn={1}
                 events={events}
-                dateGridRender={(dateString, date) => {
-                    if (dateString === new Date(2019, 6, 16).toString()) {
-                    return (
-                        <div style={{ backgroundColor: 'red', height: '100%', width: '100%' }}>123test</div>
-                    );
-                    }
-                    return null;
-                }}
+                displayValue={new Date(2022, 8, 5, 14, 45, 0)} 
             ></Calendar>
       </div>
     )