All Projects β†’ jefelewis β†’ React Native Ultimate Modal Picker

jefelewis / React Native Ultimate Modal Picker

Licence: mit
NPM Link: https://www.npmjs.com/package/react-native-ultimate-modal-picker

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to React Native Ultimate Modal Picker

Bundlephobia
πŸ‹οΈ Find out the cost of adding a new frontend dependency to your project
Stars: ✭ 6,640 (+22033.33%)
Mutual labels:  npm-package
React Timeline Carousel
React Timeline Feed Slider [UI Component]
Stars: ✭ 23 (-23.33%)
Mutual labels:  npm-package
Electron Util
Useful utilities for Electron apps and modules
Stars: ✭ 854 (+2746.67%)
Mutual labels:  npm-package
Eslint Plugin Node
Additional ESLint's rules for Node.js
Stars: ✭ 740 (+2366.67%)
Mutual labels:  npm-package
Github Spray
Draw on your GitHub contribution graph β–‘β–’β–“β–ˆ
Stars: ✭ 908 (+2926.67%)
Mutual labels:  npm-package
Tb Cli
πŸ› οΈ CLI for rapid TB generate
Stars: ✭ 8 (-73.33%)
Mutual labels:  npm-package
Mevn Cli
Light speed setup for MEVN(Mongo Express Vue Node) Apps
Stars: ✭ 696 (+2220%)
Mutual labels:  npm-package
Epoch Timeago
πŸ•“ Convert unix time to a relative time string e.g., "4 hours ago".
Stars: ✭ 20 (-33.33%)
Mutual labels:  npm-package
Easy Mock Server
A mock server for json and mock template files
Stars: ✭ 22 (-26.67%)
Mutual labels:  npm-package
Sierra
Sierra SCSS library
Stars: ✭ 852 (+2740%)
Mutual labels:  npm-package
Ky
🌳 Tiny & elegant JavaScript HTTP client based on the browser Fetch API
Stars: ✭ 7,047 (+23390%)
Mutual labels:  npm-package
Chat Codes
Encode and decode guildwars2 chat codes
Stars: ✭ 5 (-83.33%)
Mutual labels:  npm-package
Angular Loading Feedback
Angular directive to indicate loads in app
Stars: ✭ 8 (-73.33%)
Mutual labels:  npm-package
Np
A better `npm publish`
Stars: ✭ 6,401 (+21236.67%)
Mutual labels:  npm-package
Bmp085
A node.js module for reading a BMP085 barometer sensor.
Stars: ✭ 11 (-63.33%)
Mutual labels:  npm-package
Conf
Simple config handling for your app or module
Stars: ✭ 707 (+2256.67%)
Mutual labels:  npm-package
Fanyi
A πŸ‡¨πŸ‡³ and πŸ‡ΊπŸ‡Έ translate tool in your command line.
Stars: ✭ 940 (+3033.33%)
Mutual labels:  npm-package
Catchart
Pipe something from command line to a chart in the browser
Stars: ✭ 27 (-10%)
Mutual labels:  npm-package
Yarpm
CLI tool to run npm scripts with either npm or yarn, depending on how it was started
Stars: ✭ 13 (-56.67%)
Mutual labels:  npm-package
Ostrio Analytics
πŸ“Š Visitor's analytics tracking code for ostr.io service
Stars: ✭ 9 (-70%)
Mutual labels:  npm-package

React Native Ultimate Modal Picker

npm version npm downloads

Features

  • βœ… iOS/Android
  • βœ… Dark Mode
  • βœ… Built with TypeScript
  • βœ… Built with React Hooks

Built With

Pending Items

  • [ ]

Getting Started

1. Install Package:

npm i react-native-ultimate-modal-picker

2. Add Pod (For iOS)

Add the following line to ios/podfile:

pod 'RNDateTimePicker', :path => '../node_modules/@react-native-community/datetimepicker/RNDateTimePicker.podspec'

3. Install Pods (For iOS)

cd ios
pod install

4. Add Dependencies (For Android)

Add the following lines to android/settings.gradle:

include ':react-native-datetimepicker'
project(':react-native-datetimepicker').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/datetimepicker/android')

Add the following line to android/app/build.gradle:

dependencies {
  ...
  implementation project(':react-native-datetimepicker')
}

5. Run Project:

react-native run-ios

Example Code

// Imports: Dependencies
import React from 'react';
import { SafeAreaView } from 'react-native';
import {
  DateRangePicker,
  DatePicker,
  TimePicker,
  DateTimePicker,
  ListPicker,
  NumberPicker,
  CookingAmountPicker,
  StatePicker,
  StatePickerSmall,
  TextField,
} from 'react-native-ultimate-modal-picker';

// React Native App
const App = () => {

  // Test Data
  const items: any = [
    { label: '1', value: '1' },
    { label: '2', value: '2' },
    { label: '3', value: '3' },
    { label: '4', value: '4' },
    { label: '5', value: '5' },
    { label: '6', value: '6' },
    { label: '7', value: '7' },
    { label: '8', value: '8' },
    { label: '9', value: '9' },
    { label: '10', value: '10' }
  ];

  return (
    <SafeAreaView style={{ display: 'flex', flex: 1 }}>
      {/* Date Picker (Modes: spinner/calendar) */}
      <DatePicker
        title="Date"
        onChange={(date) => console.log(date)}
        mode="spinner"
      />

      {/* Time Picker (Modes: spinner/clock) */}
      <TimePicker
        title="Time"
        onChange={(date) => console.log(date)}
        mode="spinner"
      />

      {/* Date Time Picker (iOS Only) */}
      <DateTimePicker
        title="Date/Time"
        onChange={(date) => console.log(date)}
      />

      {/* List Picker */}
      <ListPicker
        title="List"
        items={items}
        onChange={(item) => console.log(item)}
      />

      {/* Number Picker */}
      <NumberPicker
        title="Number"
        onChange={(item) => console.log(item)}
      />

      {/* Cooking Measurement Picker */}
      <CookingAmountPicker
        title="Measurement"
        onChange={(item) => console.log(item)}
      />

      {/* State Picker */}
      <StatePicker
        title="State"
        onChange={(state) => console.log(state)}
      />

      {/* State Picker (Small) */}
      <StatePickerSmall
        title="State"
        onChange={(state) => console.log(state)}
      />

      {/* Date Range Picker */}
      <DateRangePicker
        title="Date Range"
        onFromChange={(date) => console.log(date)}
        onToChange={(date) => console.log(date)}
        mode="spinner"
      />

      {/* Text Field */}
      <TextField
        title="Text"
        value={(text: string | number) => console.log(text)}
      />
    </SafeAreaView>
  );
};

Picker Types (iOS)

1. Date

2. Time

3. Date/Time (iOS Only)

4. List

5. State (50 United States)

Picker Types (Android)

1. Date (Mode: Spinner)

2. Date (Mode: Calendar)

3. Time (Mode: Spinner)

4. Time (Mode: Clock)

5. List

6. State (50 United States)

Changelog

[0.2.2] - 8/10/2020

Added

  • Added Dark Mode support. Please upgrade to React Native 0.62 for this to work.
  • Added @react-native-community/picker dependency (Picker is soon to be deprecated).

[0.2.1] - 8/10/2020

Changed

  • Updated react dependency.
  • Updated react-native dependency.
  • Updated react-native-modal dependency.

Removed

  • Removed moment dependency.

[0.2.0] - 4/21/2020

Changed

  • Updated @react-native-community/datetimepicker to 2.3.2.
  • Removed unnecessary try/catch blocks.

[0.1.64] - 3/13/2020

Changed

  • Updated dependencies.

[0.1.63] - 3/13/2020

Changed

  • Changed CookingAmountPicker to CookingAmountPicker.
  • Fixed defaultValue prop for CookingAmountPicker and ListPicker.

[0.1.62] - 3/13/2020

Added

  • Added defaultValue prop for CookingAmountPicker and ListPicker.

[0.1.59] - 3/5/2020

Changed

  • Fixed selectItem string/number type issue.

[0.1.59] - 3/5/2020

Added

  • Added NumberPicker.
  • Added CookingAmountPicker.

Changed

  • Increased inputTitleContainer width.

[0.1.58] - 2/7/2020

Changed

  • Increased fieldTextContainer marginBottom to 12px.

[0.1.57] - 2/7/2020

Changed

  • Fixed @react-native-community/datetimepicker ^2.1.1 vs 2.1.1 issue.

[0.1.56] - 2/7/2020

Changed

  • Updated @react-native-community/datetimepicker to 2.1.1.
  • Changing backdrop opacity to 30%.
  • Increased TouchableOpacity size for DateRangePicker.
  • Increased pickerHeaderContainer height to 45px.
  • Fixed README podspec issue.

Removed

  • Removed React Native Vector Icons.

[0.1.55] - 1/28/2020

Changed

  • Fixed onChange issue.
  • Done button is now disabled unless a new item or state is picked.

[0.1.54] - 1/28/2020

Added

  • Adding typings for onChange.
  • Passing initial date to parent component (useEffect) for Date, Time, Datetime, and Date Range Pickers.

Changed

  • Date Range's toDate is now defaulted to "Select."

[0.1.53] - 1/27/2020

Changed

  • Fixed Picker Done button issue. Done button is now disabled unless new date is picked.
  • Increased Picker container size for iOS.

Removed

  • Removed async/await due to that it was not the root cause of the issue.

[0.1.47] - 1/26/2020

Changed

  • Fixed onChange TypeScript typings.

[0.1.46] - 1/26/2020

Changed

  • Fixed React Hook state + onValueChange issue due to having the same name of "state."

[0.1.45] - 1/26/2020

Changed

  • Added keyboard dismiss to toggleModal().

[0.1.44] - 1/25/2020

Added

  • Added keyboard dismiss to work better with form fields.

[0.1.43] - 1/24/2020

Changed

  • Fixed README Formatting.

[0.1.42] - 1/24/2020

Added

  • Added cancel button to iOS ListPicker.
  • Added test data items for ListPicker on README.
  • Added props to App.tsx for testing.
  • Title props can be added to any Picker. Default titles are shown if no prop is added.

Changed

  • Reformatted App.tsx for when testing.
  • Fixed onChange TypeScript Typings.
  • Updated README screenshot GIFs.

[0.1.41] - 1/23/2020

Changed

  • Updated README for NPM package.

[0.1.40] - 1/23/2020

Added

  • Added podfile installation instructions to README.
  • Added cancel button for iOS modals.

Changed

  • Fixed if/else toggle issue.
  • Fixed undefined date issue.
  • Fixed onChange issue.
  • Changed if statements for Platform to else/if so only one would ever run.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].