Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-ui-datepicker

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-ui-datepicker

Customizable datetime picker for React Native

  • 1.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-native-ui-datepicker


react-native-ui-datepicker

styled with prettier license

UI DatePicker component for React Native that allows you creating customizable date and time picker. The component use Day.js library and it contains a set of style props that allows you to change every items of calendar based on your own ui design.

Installation

npm install react-native-ui-datepicker

Or

yarn add react-native-ui-datepicker

Usage

import DateTimePicker from '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

NameTypeDefaultDescription
valueDateTypeDayjsDatePicker value to display selected date
onValueChangefunc() => {}Called when the new date selected from DatePicker
modestring'datetime'Defines the DatePicker mode ['datetime', 'date', 'time']
localestring'en'Defines the DatePicker locale
minimumDateDateTypenullDefines DatePicker minimum selectable date
maximumDateDateTypenullDefines DatePicker maximum selectable date
displayFullDaysbooleanfalseDefines show prev and next month days in current calendar view
calendarTextStyleTextStylenullDefines all texts styles inside calendar (Days, Months, Years, Hours and Minutes)
selectedTextStyleTextStylenullDefines selected (Day, Month, Year) text styles
selectedItemColorstring'#0047FF'Defines selected (Day, Month, Year) background and border colors
headerContainerStyleViewStylenullDefines calendar header container style
headerTextContainerStyleViewStylenullDefines calendar header texts (Month, Year, Time) containers style
headerTextStyleViewStylenullDefines calendar header texts styles (Month, Year, Time)
headerButtonStyleViewStylenullDefines calendar header "prev and next buttons" containers style
headerButtonColorstringnullDefines calendar header "prev and next buttons" icon color
headerButtonSizenumber18Defines calendar header "prev and next buttons" icon size
headerButtonsPositionstring'around'Defines calendar header "prev and next buttons" positions ['around', 'right', 'left']
buttonPrevIconReactNodeundefinedDefines calendar header "prev button" custom icon
buttonNextIconReactNodeundefinedDefines calendar header "next button" custom icon
dayContainerStyleViewStylenullDefines days containers style
monthContainerStyleViewStylenullDefines months containers style
yearContainerStyleViewStylenullDefines years containers style
weekDaysContainerStyleViewStylenullDefines weekdays container style
weekDaysTextStyleTextStylenullDefines weekdays texts style
timePickerContainerStyleViewStylenullDefines time picker container style
timePickerTextStyleTextStylenullDefines 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 with a star.

License

MIT

Keywords

FAQs

Package last updated on 27 Oct 2023

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc