Skip to content

Releases: farhoudshapouran/react-native-ui-datepicker

v3.0.4

20 Feb 08:26
Compare
Choose a tag to compare

This release introduces month and year disabling based on minDate and maxDate, improving the user experience, and fixing an issue about a semantically incorrect header tag with react-native-web.

What's Changed

feat: add new functionality for disabling unavailable months, year by @mystica2000 in #140
fix: remove accessibilityRole from header component #115 by @farhoudshapouran

v3.0.3

19 Feb 07:43
Compare
Choose a tag to compare

This release addresses some issues.

What's Changed

fix: /lib/commonjs/index not found error #154
fix: change return values of onChange to javascript Date object #91
fix: misspelled typo in props #81 #117

v3.0.2

18 Feb 12:40
fb18bfb
Compare
Choose a tag to compare

This release introduces a new styling method, provides full support for NativeWind, adds a custom components prop, and addresses various bugs and improvements in localization.

What's Changed

fix: remove dayjs from peer dependency. you don't need to install it anymore if you don't need it.
feat: add className and classNames props to support styling with NativeWind.
feat: add style and styles props to allow styling with StyleSheet.
feat: add components prop to replace the default rendered elements.
feat: add numerals prop to specify the numeral system to use.
feat: add month and onMonthChange props to handle active month programmatically.
feat: add year and onYearChange props to handle active month programmatically.
feat: add min and max props to control minimum and maximum selectable dates in range and multiple modes.
feat: add multiRangeMode prop to display selecting multiple dates in a range row.
feat: add hideHeader, hideWeekdays, disableMonthPicker, and disableYearPicker props for better customization.
feat: add weekdaysFormat, monthsFormat, and monthCaptionFormat props to format displaying texts.
feat: add timeZone to define the timezone for the DateTimePicker.
fix: 'React is not defined' error in old React versions.
fix: time picker scroll issue in nested scroll views.
fix: minDate and maxDate issues when their values were changed after initialization.

Breaking Changes

prop displayFullDays renamed to showOutsideDays.
prop height renamed to containerHeight.
prop headerButtonsPosition renamed to navigationPosition.
all styling props in v2 removed.

Upgrading Guide

After importing the component you also need to import getDefaultStyles or getDefaultClassNames (if you prefer NativeWind) to pass to the component.

import { useState } from  'react';
import DateTimePicker, { DateType, getDefaultStyles } from 'react-native-ui-datepicker';

export function Calendar() {
  const defaultStyles = getDefaultStyles();
  const [selected, setSelected] = useState<DateType>();

  return (
    <DateTimePicker
      mode="single"
      date={selected}
      onChange={({ date }) =>  setSelected(date)}
      styles={defaultStyles}
    />
  );
}

If you're using NativeWind in your project, apply Tailwind CSS class names to style the calendar. Use the classNames prop to apply custom class names instead of the default ones.

import { useState } from  'react';
import DateTimePicker, { DateType, getDefaultClassNames } from 'react-native-ui-datepicker';

export function Calendar() {
  const defaultClassNames = getDefaultClassNames();
  const [selected, setSelected] = useState<DateType>();

  return (
    <DateTimePicker
      mode="single"
      date={selected}
      onChange={({ date }) =>  setSelected(date)}
      classNames={defaultClassNames}
    />
  );
}

v2.0.11

03 Feb 07:42
Compare
Choose a tag to compare

Bug fixes
fix disabled days style

v2.0.10

02 Feb 10:19
Compare
Choose a tag to compare

Bug fixes
Typescript declarations broke (#138)

v2.0.8

01 Feb 21:10
Compare
Choose a tag to compare

Bug Fixes
Remove unnecessary declarations file (#138)

v2.0.7

01 Feb 17:08
Compare
Choose a tag to compare

Bug Fixes
Calendar day opacity for range mode (#124)

v2.0.6

01 Feb 16:18
Compare
Choose a tag to compare

Bug Fixes
Fixed time picker issue on android

v2.0.5

01 Feb 15:23
Compare
Choose a tag to compare

Bug Fixes
Fixed time picker initial value issue
Fixed locale change

Improvements
Refactored components for better performance

v2.0.4

15 Sep 21:19
Compare
Choose a tag to compare
  • Feature: Disable Custom Dates #102
  • Fix: Style on Selected Range #92