🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

rn-react-native-calendar

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-react-native-calendar

calendar package for react native

5.1.2
latest
Source
npm
Version published
Weekly downloads
29
480%
Maintainers
1
Weekly downloads
 
Created
Source

rn-react-native-calendar

This is a calendar package for react native

Installation

npm install rn-react-native-calendar

Note

Week Calendar Usage

import {WeekCalendar} from "rn-react-native-calendar"


const App =()=>{
    const items = {
        '2022-04-28':{},
        '2022-05-03':{}
    }
    return(
        <View>
            <WeekCalendar items={items} itemsOnThisDate={(items)=>console.log(items)} />
        </View>
    )
}






Screenshot_20220503_185314 (1)

Week Calendar Props

Propdescriptiontypedefualt value
itemsitems which you want to be marked on calendarobject{}
buttonColorcolor on left and right button backgroundstring'#FFEADF'
selectedDateColorselected date background Colorstring'#ff5a3d'
todayDateColortoday's date backgroundColorstring'gray'
itemsOnThisDatecallback which triggers when you click on date with items datafunction(item)=>{ }

CalendarModal Usage

import {CalendarModal} from "rn-react-native-calendar"

const App =()=>{
    const [showCalendar,setShowCalendar] = useState(false)
     const [date,setDate] = useState(new Date())
    const items = {
        '2022-04-28':{},
        '2022-05-03':{}
    }
    const onDayPressChanges = (date)=>{
    
    return(
        <View>
            <CalendarModal 
            items={items}
             currentDate={date} 
            visible={showCalendar} 
            onDayPress={(date)=>onDayPressChanges(date)} 
            onDismiss={()=>setShowCalendar(false)} 
            selectedDateColor={'#ff5a3d'}
            
            />
        </View>
    )
}

CalendarModal Props

Propdescriptiontypedefualt value
itemsitems which you want to be marked on calendarobject{}
visibleshould show calendar modal or notbooleanfalse
selectedDateColorselected date background Colorstring'#ff5a3d'
onDayPresscallback triggered when a day is pressedfunction(data)=>{ }
onDismisscallback which triggers when calendar modal closesfunction()=>{ }

Screenshot_20220503_182451_com example (1) Screenshot_20220503_182454_com example Screenshot_20220503_182459_com example

Contributing

feel free to contribute

License

MIT

Keywords

react-native

FAQs

Package last updated on 03 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts