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

txend-react-native-ui-datepicker

v1.0.12

Published

Customizable multi-date range datetime picker for React Native

Downloads

72

Readme

txend-react-native-ui-datepicker


txend-react-native-ui-datepicker

styled with prettier license

DateTimePicker component for React Native that allows you to create a customizable date and time picker. The component uses Day.js library and it contains a set of style props that allows you to change every item of calendar based on your own UI design. Please visit demo.

Installation

npm install txend-react-native-ui-datepicker

Or

yarn add txend-react-native-ui-datepicker

Usage

import DateTimePicker from 'txend-react-native-ui-datepicker';
import dayjs from 'dayjs';

export default function App() {
  const [value, setValue] = useState(dayjs());
  
  return (
    <View style={styles.container}>
      <DateTimePicker
        value={value}
        onValueChange={(date) => setValue(date)}
      />
    </View>
  )
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#F5FCFF',
  },
});

For more, take a look at the /example directory.

react-native-ui-datepicker-styles

Available props

| Name | Type | Default | Description | | ------------------------ | --------------- | --------------- | -------------------------------------------------------------------------------------- | | value | DateType | Dayjs | DatePicker value to display selected date | | onValueChange | func | () => {} | Called when the new date selected from DatePicker | | mode | string | 'datetime' | Defines the DatePicker mode ['datetime', 'date', 'time'] | | locale | string | 'en' | Defines the DatePicker locale | | minimumDate | DateType | null | Defines DatePicker minimum selectable date | | maximumDate | DateType | null | Defines DatePicker maximum selectable date | | firstDayOfWeek | number | 0 | Defines the starting day of week, number 0-6, 0 - Sunday, 6 - Saturday | | displayFullDays | boolean | false | Defines show previous and next month's days in the current calendar view | | calendarTextStyle | TextStyle | null | Defines all text styles inside the calendar (Days, Months, Years, Hours, and Minutes) | | selectedTextStyle | TextStyle | null | Defines selected (Day, Month, Year) text styles | | selectedItemColor | string | '#0047FF' | Defines selected (Day, Month, Year) background and border colors | | headerContainerStyle | ViewStyle | null | Defines calendar header container style | | headerTextContainerStyle | ViewStyle | null | Defines calendar header texts (Month, Year, Time) containers style | | headerTextStyle | TextStyle | null | Defines calendar header text styles (Month, Year, Time) | | headerButtonStyle | ViewStyle | null | Defines calendar header "prev and next buttons" containers style | | headerButtonColor | string | null | Defines calendar header "prev and next buttons" icon color | | headerButtonSize | number | 18 | Defines calendar header "prev and next buttons" icon size | | headerButtonsPosition | string | 'around' | Defines calendar header "prev and next buttons" positions ['around', 'right', 'left']| | buttonPrevIcon | ReactNode | undefined | Defines calendar header "prev button" custom icon | | buttonNextIcon | ReactNode | undefined | Defines calendar header "next button" custom icon | | dayContainerStyle | ViewStyle | null | Defines days containers style | | todayContainerStyle | ViewStyle | null | Defines today container style | | todayTextStyle | TextStyle | null | Defines today text style | | monthContainerStyle | ViewStyle | null | Defines months containers style | | yearContainerStyle | ViewStyle | null | Defines years containers style | | weekDaysContainerStyle | ViewStyle | null | Defines weekdays container style | | weekDaysTextStyle | TextStyle | null | Defines weekdays texts style | | timePickerContainerStyle | ViewStyle | null | Defines time picker container style | | timePickerTextStyle | TextStyle | null | Defines time picker (Hours, Minutes) texts style |

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Consider supporting with a ⭐️ Star on GitHub

If you are using the library in one of your projects, please consider supporting it with a star.

License

MIT