From c22a08aa6653701bf1eb852efca5a3028f67caa6 Mon Sep 17 00:00:00 2001 From: Lidor Dafna Date: Mon, 9 Aug 2021 13:26:19 +0300 Subject: [PATCH] Add example with inactive days --- example/src/screens/calendars.tsx | 35 ++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/example/src/screens/calendars.tsx b/example/src/screens/calendars.tsx index 598066d60b..59722dd9d6 100644 --- a/example/src/screens/calendars.tsx +++ b/example/src/screens/calendars.tsx @@ -3,7 +3,6 @@ import {StyleSheet, View, ScrollView, Text, TouchableOpacity, Switch} from 'reac // @ts-expect-error import {Calendar} from 'react-native-calendars'; - const testIDs = require('../testIDs'); const INITIAL_DATE = '2020-02-02'; @@ -24,7 +23,6 @@ const CalendarsScreen = () => { Calendar with selectable date { disableTouchEvent: true, selectedColor: 'orange', selectedTextColor: 'red' - }, - '2020-02-10': { - inactive: true - }, - '2020-02-11': { - inactive: true } }} /> @@ -390,6 +382,27 @@ const CalendarsScreen = () => { ); }; + const renderCalendarWithInactiveDays = () => { + return ( + + Calendar with inactive days + + + ); + }; + const renderMarkedDatesExamples = () => { return ( @@ -411,6 +424,7 @@ const CalendarsScreen = () => { {renderCalendarWithMinAndMaxDates()} {renderCalendarWithCustomDay()} {renderCalendarWithCustomHeader()} + {renderCalendarWithInactiveDays()} ); }; @@ -430,10 +444,7 @@ const CalendarsScreen = () => { }; return ( - + {renderSwitch()} {showMarkedDatesExamples && renderMarkedDatesExamples()} {!showMarkedDatesExamples && renderExamples()}