npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wm-react-native-datepicker

v0.1.9

Published

test

Downloads

12

Readme

wm-react-native-datepicker

Datepicker for mobile, based on https://code.tutsplus.com/tutorials/how-to-create-a-react-native-calendar-component--cms-33664

Timepicker for mobile, based from https://www.npmjs.com/package/react-native-wheel-time-picker

Installation

Put dependence in package.json as

wm-react-native-datepicker: "bitbucket:watermelontecnologia/wm-react-standard-datepicker.git"
npm install wm-react-native-datepicker

Usage

import DateTimePicker from 'wm-react-native-datepicker';

// ...

const [date, setDate] = useState(new Date());
  return (
    <View style={styles.container}>
     <DateTimePicker
        activeDate={date}
        setActiveDate={(value) => setDate(value)}
        isOpen={isOpen}
        setIsOpen={(value) => setIsOpen(value)}
        language={'pt'}
        type={'both'}
        dateProps={{headerStyle: {backgroundColor: 'blue'}}}
      />
    </View>
  );

Props

| name | required | type | description | |---------------|----------|-------------------------|-----------------------------------------------------------------------------------------------------------------------------| | setIsOpen | y | (value: number) => void | Function to set state isOpen, to close modal | | isOpen | y | bool | State isOpen for modal, to open and close | | dateProps | n | object | Style for date picker (see below) | | timeProps | n | object | Props for time picker(see below) | | type | y | string | Type of picker, date to display calendar, time to display timepicker, both to display calendar and after display time | | activeDate | y | Date | Selected date | | setActiveDate | y | (value: Date) => void | Function to set activeDate | | language | y | string | language code, such as "en", "pt" | | minDate | n | Date | minimum date that can be selected | | maxDate | n | Date | maximun date that can be selected | | buttonConfirm | n | object | style of confirmed button | | buttonCancel | n | object | style of cancel button | | weekDaysDisable | n | Array | Array of week days to be disabled, accepted values ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sat'] | | daysDisable | n | Array | Array of days to be disabled | | minInterval | n | number | interval of minutes |

dateProps

| name | type | description | |-----------------------|--------|------------------------------------------------------| | headerStyle | object | Style for header of calendar | | monthTextStyle | object | Style for text of month | | arrowButtonStyle | object | Style for button of previous and next month | | backgroundCalendar | string | Background color of calendar | | arrowTextColor | string | Color of text of buttons of previous and next month | | activeTextColor | string | Color of text of active date | | activeBackgroundColor | string | Background color of active date | | currentTextColor | string | Text color of current date | | daysTextColor | string | Text color of days | | colorDisable | string | Text color of disabled days |

timeProps

| name | type | description | |----------------|-----------|----------------------------| | containerStyle | ViewStyle | style of the outer view | | itemHeight | number | height of item in Wheel | | selectedColor | string | color of selected time | | disabledColor | string | color of deselected time | | displayCount | number | number of displayed values | | markerColor | string | color of marker |

Run example

yarn example android

Fix lint

npm run lint -- --fix

Publish in npm

Change version number in package.json, then run

npm login

and then run

npm run publish:npm

License

MIT


Made with create-react-native-library