farhoudshapouran / react-native-ui-datepicker

Customizable React Native 📅 DatePicker component for Android, iOS, and Web. It includes single, range and multiple modes and supports different locales.
https://farhoudshapouran.github.io/react-native-ui-datepicker/
MIT License
453 stars 52 forks source link

Feature Request: Month / year picker #125

Open devcodemada opened 1 month ago

devcodemada commented 1 month ago

Request new feature that picker can only max view in month or year

like a initialValue props, but if we click month that will be get data of the month

Mneto12 commented 3 weeks ago

@devcodemada I recently used this library and could be nice if when I select the month get a onChange function for month and year, and not select the month and then the day.

blazk0 commented 6 days ago

Would be nice to be added, as in my case, i only need to select a month

ulucantugberk commented 4 days ago

react-native-ui-datepicker+2.0.4.patch

You can try adding this patch. I added it with a simple implementation.

import Moment from 'moment'; import DateTimePicker from 'react-native-ui-datepicker';

<DateTimePicker calendarTextStyle={styles.calenderText} headerTextStyle={styles.headerText} selectedItemColor={COLOR_PRIMARY} selectedTextStyle={styles.selectedText} mode={'single'} locale={'tr'} initialView={'month'} onlyMonth buttonPrevIcon={()} buttonNextIcon={()} firstDayOfWeek={1} date={start_date} minDate={this.state.first_date} maxDate={Moment()} onChange={({date}) => _onChangeFunction()} />