1.2.4 • Published 11 months ago

react-native-daily-calendar v1.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

:control_knobs: react-native-daily-calendar

A highly customizable Month and Date Picker component for React Native using momentjs. Support this project with a ★ on Github.

:inbox_tray: Installation

You can install this package using either Yarn or NPM.

npm install react-native-daily-calendar

yarn add react-native-daily-calendar

react-native-daily-calendar requires moment to be installed, which is a peer dependency.

:bulb: Usage

import DailyCalendar from 'react-native-daily-calendar';

function App() {
   const [selectedDate, setSelectedDate] = useState(moment().format("DD-MM-YYYY"))
  return (
   <DailyCalendar
     onDateChangeCalendar={value => {
     setSelectedDate(moment(value, 'YYYY-MM-DD').format('DD-MM-YYYY'));
     }}
    />
  );
}

:book: Props

PropertyTypeDefaultDescription
isMonthPickerReqbooltrueBoolean for month picker.
isDatePickerReqbooltrueBoolean for date picker.
onDateChangeCalendarfunctionnullCallback called when the user changing the date.
onMonthChangeCalendarfunctionnullCallback called when the user changing the month.
monthContainerStyleViewStylenullCustom styling for month container
LeftArrowIconJSX.ElementDefault IconMonth Picker Right Icon slider.
RightArrowIconJSX.ElementDefault IconMonth Picker left Icon slider.
monthTextStyleTextStyle-Custom styling for Month Name.
dateStyleTextStyle-Custom styling for date.
dayStyleTextStyle-Custom styling for day.
activeDateColorString-Background color for active date.
dateContainerStyleViewStyle-Custom styling for date tabs.
dayFormatstringdddCustom day format for days
CustomMonthComponentJSX.ElementDefault Month ViewCustom Month Container

:art: Demo

You can try the example app by cloning this repo and running the following commands:

cd example
yarn install
npx expo start

:handshake: Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request if you find a bug or have a feature request. See the contributing guide to learn how to contribute to the repository and the development workflow.

:scroll: License

This project is licensed under the MIT License.

1.2.4

11 months ago

1.2.3

11 months ago

1.1.3

11 months ago

1.1.2

11 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.0.11

11 months ago

1.0.10

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago