-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
51 lines (45 loc) · 1022 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*This is an Example of Facebook Login*/
import React, { Component } from 'react';
import {Calendar, CalendarList, Agenda} from 'react-native-calendars';
export default class App extends Component {
render() {
const disableDate = [
{
"date": "2020-07-13",
"id":1
},
{
"date": "2020-08-20",
"id":1
},
{
"date": "2020-07-27",
"id":1
},
{
"date": "2020-07-31",
"id":1
},
{
"date": "2020-08-13",
"id":1
}
]
let newDaysObject = {};
disableDate.forEach((day) => {
newDaysObject[day.date] = {
disabled: true,
disableTouchEvent: true
};
});
return (
<Calendar
onDayPress={(day) => {console.warn('selected day', day)}}
hideExtraDays={true}
onPressArrowLeft={subtractMonth => subtractMonth()}
onPressArrowRight={addMonth => addMonth()}
markedDates={newDaysObject}
/>
);
}
}