1.0.9 • Published 1 year ago

react-native-onth-year-picker v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

react-native-month-year-picker

This is the React-Native-Month-Year Picker Supporting Both IOS and Android | |

Getting started

$ npm install react-native-onth-year-picker --save

Read more about autolinking here.

## Usage

import React, { useState, useEffect, useContext } from "react";
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
import MonthYearPicker from "react-native-onth-year-picker";
export default function App() {
  const [datepicker, hideDatePicker] = useState(false);

  return (
    <View style={styles.container}>
      <TouchableOpacity
        style={{
          width: "40%",
          height: "8%",
          backgroundColor: "green",
          borderRadius: 10,
        }}
        onPress={() => {
          hideDatePicker(true);
        }}
      >
        <View
          style={{ alignItems: "center", justifyContent: "center", flex: 1 }}
        >
          <Text style={{ color: "#fff", fontSize: 15, fontWeight: "bold" }}>
            Click
          </Text>
        </View>
      </TouchableOpacity>
      <MonthYearPicker
        isShow={datepicker}
        close={() => {
          hideDatePicker(false);
        }}
        onChangeYear={(year) => {
          console.log("Year", year);
        }}
        onChangeMonth={(Month) => {
          console.log("Month", Month);
        }}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
});
1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.0

1 year ago