Skip to content

noobd3veloper/react-native-picker-weekday

 
 

Repository files navigation

WeekDay Picker

checkOutNpmPackageHere

Simple Customizable Weekday Picker for react native and Expo.

  • Steps to use
    • npm i react-native-picker-weekday
import * as React from 'react'
import { DayPicker } from 'react-native-picker-weekday'
const SampleApp = () => {
  const [weekdays, setWeekdays] = React.useState([-1])
  return (
    <DayPicker
      weekdays={weekdays}
      setWeekdays={setWeekdays}
      activeColor='violet'
      textColor='white'
      inactiveColor='grey'
      dayTextStyle = {{/*All styles applicable to text component*/}}  //(optional for high styling flexiblity)
      itemStyles ={{/*All Styles applicable to View component*/}}     //(optional for high styling flexiblity)
      wrapperStyles ={{/*All Styles applicable to View component*/}}  // (optional for high styling flexiblity)  
    />
  )
}
  • Uses a number[] type React State.
  • Simple created by setting initial state to [-1] dont pick 1-7
  • Pass the state and StateSetter to see the selected components.
  • State list intially will have [-1] then state change will contain numbers 1-7 (sunday-saturday) as per selection.

package

About

A Simple lightweight Weekday Picker for React Native.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 54.8%
  • Kotlin 21.4%
  • TypeScript 8.0%
  • Swift 7.3%
  • Ruby 4.4%
  • Starlark 2.1%
  • Objective-C 2.0%