Git Product home page Git Product logo

react-native-week-selector's Introduction

react-native-week-selector

A simple and customisable week selector

code style: prettier NPM Version NPM Downloads

Install the module with:

npm install react-native-week-selector --save

Try it on Expo

Simply import the component

import WeekSelector from 'react-native-week-selector';

Then use as follows

<WeekSelector />
Prop Description Default
date Set initial date new Date()
containerStyle Additional style for the container undefined
selectorContainerStyle Additional style for the selector containers undefined
dateContainerStyle Additional style for the date container undefined
textStyle Additional style for the date text undefined
whitelistRange 2 values indicating the earliest/latest the user can change to []
onWeekChanged Event triggered when changing week undefined
weekStartsOn Which day does the week start on 1 (Monday)
renderPreviousSelector Override the default previous selector undefined
renderNextSelector Override the default next selector undefined
dayFormat Display format for the day DD (05)
monthFormat Display format for the month MMMM (September)

Feel free to do pull requests if a certain feature you want is missing. We accept all PR's that are enhancements to the project.

react-native-week-selector's People

Contributors

dharkflower avatar johan-dutoit avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-week-selector's Issues

weekStartsOn not working as intended

The weekStartsOn prop only works for the initial date. As soon as you change the week, it defaults back to 0. The date returned on the onWeekChanged method defaults to Sunday.

Expo example on ReadMe.md needs update

The example caused an error Cannot read properties of undefined (reading 'statusBarHeight') Evaluating App.js Loading App.js.
This is because we have to import constants from expo-constants import Constants from 'expo-constants' instead of expo import Constants from 'expo'. I thought this might be a helpful tip for anyone facing this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.