Repository navigation
Expand file tree
/
Copy pathschedule.js
More file actions
53 lines (40 loc) · 1.56 KB
/
Copy pathschedule.js
File metadata and controls
53 lines (40 loc) · 1.56 KB
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
52
53
import React from 'react';
import {Text,View,StyleSheet,FlatList} from 'react-native';
import {Calendar} from 'react-native-calendars';
const App = () =>{
const[ShowCalendar,setShowCalendar] = useState(false)
const [assignments,setAssignments] = useState('')
return(
<View>
<TextInput
placeholder = "Type your schedule here....."
onChangeText = {setAssignments}
value = {assignments}
/>
<TouchableOcapicity
onPress = {() => SetShowCalendar(true)}
style = {{
backgroundColor: 'black',
borderRaiuds: 10,
margin: 30}}>
<Text style = {{color:'white',fontSize:20}}>Calendar</Text>
</TouchableOcapicity>
<Modal visible = {ShowCalendar} animationType = 'fade'>
<Calendar style = {{borderRadius: 8, margin: 40}}
onDayPress={date =>{
console.log(date)
setShowCalendar(false)
}}
initialDate = {'2024-06-16'}
noteDate={{
'2024-06-16':{marked:true, dotColor:'red',selected:true,
selcetedColor:'purple',selectedTextColor:'white'
}
}}
/>
</Modal>
</View>
)
}
const styles = StyleSheet.create({})
export default App;