1.0.23 • Published 1 year ago

expo-datepicker v1.0.23

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

expo-datepicker

Build Status

expo-datepicker is a beautiful and simple datepicker for react native and expo

DEMO

Installation

npm i expo-datepicker
yarn add expo-datepicker

Example

import React, { useState } from "react";
import { StyleSheet, Text, View, ViewStyle } from "react-native";
import DatePicker from "expo-datepicker";
import { Entypo } from "@expo/vector-icons";
export default function App() {
  const [date, setDate] = useState(new Date().toString());

  return (
    <View style={styles.container}>
      <DatePicker
        date={date}
        onChange={(date) => setDate(date)}
        icon={<Entypo name="chevron-right" size={40} color="#689CA3" />}
      />
    </View>
  );
}

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

Properties

PropertyDescription
dateCurrent date selected
iconIcon
fontStyleInput text style
containerStyleContainer Style
backgroundColorInput background color
borderColorChange border color
inputDayStyleChange style day input
inputMonthStyleChange Style month input
inputYearStyleChange style year input
inputStyleChange style of all input
itemStyleModalChange style item modal
modalBackgroundColorChange modal background
selectedColorChange color item modal
selectedTextColorChange text color item
textStyleModalChange text style item

Events

PropertyDescription
onChange(date:string)=>void

License

MIT

Free Software, Hell Yeah!