Skip to content

Releases: web-ridge/react-native-paper-dates

Release 0.4.4

07 Apr 20:02
Compare
Choose a tag to compare

0.4.4 (2021-04-07)

Bug Fixes

  • fixed bug with grid height (6c970da)
  • improve performance on smaller devices (c36351a)
  • improve performance on smaller devices (280c135)

Release 0.4.2

02 Apr 10:15
Compare
Choose a tag to compare

0.4.2 (2021-04-02)

Bug Fixes

  • fixed Jumpy modal on notch devices #62

Release 0.4.1

17 Mar 19:10
Compare
Choose a tag to compare

0.4.1 (2021-03-17)

Bug Fixes

Release 0.4.0

10 Mar 22:18
Compare
Choose a tag to compare

0.4.0 (2021-03-10)

Bugfixes

  • DatePicker crashes when entering invalid date in edit. Thanks @chakrihacker!

Features

  • min/max date in range picker by @nandorojo (Twitter
  • When using multiselect and selecting multiple days after each other show the range layout in background #50
  • also check valid range in input mode + show errors (92c7c94)
  • optional range util (7408a8c)
  • valid range support (1b5da06)

Breaking changes

  • removed undocumented excludeInRange mode

Release 0.3.2

06 Mar 18:05
Compare
Choose a tag to compare

0.3.2 (2021-03-06)

Bug Fixes

  • change format and try to fixed weekdays wrong format on some devices (with other date format than the DD-MM-YYYY )#53 (18eaa23)

Release 0.3.1

06 Mar 17:44
Compare
Choose a tag to compare

0.3.1 (2021-03-06)

Bug Fixes

Release 0.3.0

20 Feb 15:50
Compare
Choose a tag to compare

0.3.0 (2021-02-20)

New features

You can use it like this

import * as React from 'react';
import { Button } from 'react-native-paper';

import { DatePickerModal } from 'react-native-paper-dates';

export default function ReadMeExampleMultiple() {
  const [dates, setDates] = React.useState<Date[] | undefined>();
  const [open, setOpen] = React.useState(false);

  const onDismiss = React.useCallback(() => {
    setOpen(false);
  }, [setOpen]);

  const onConfirm = React.useCallback((params) => {
    setOpen(false);
    setDates(params.dates);
    console.log('[on-change-multi]', params);
  }, []);

  return (
    <>
      <Button onPress={() => setOpen(true)} uppercase={false} mode="outlined">
        Pick multiple dates
      </Button>

      <DatePickerModal
        // locale={'en'} optional, default: automatic
        mode="multiple"
        visible={open}
        onDismiss={onDismiss}
        dates={dates}
        onConfirm={onConfirm}
        // locale={'nl'} // optional
        // saveLabel="Save" // optional
        // label="Select period" // optional
        // startLabel="From" // optional
        // endLabel="To" // optional
        // animationType="slide" // optional, default is slide on ios/android and none on web
      />
    </>
  );
}

Release 0.2.15

20 Jan 20:40
Compare
Choose a tag to compare

0.2.15 (2021-01-20)

Bug Fixes

  • Fix for 'Not working on Android' (#33) Thanks to @dviluk for helping me on the issue 👌!

You should re-read the instructions for Android since we didn't follow the flow diagram provided by FormatJS it will result in errors on Android if not using Hermes (but it will potentially also result in bugs in the future when using Hermes)

The import order of the formatjs imports was wrong and should change to the code below.

// on top of your index.js file
const isAndroid = require('react-native').Platform.OS === 'android';
const isHermesEnabled = !!global.HermesInternal;

// in your index.js file
if (isHermesEnabled || isAndroid) {

  require('@formatjs/intl-getcanonicallocales/polyfill');
  require('@formatjs/intl-locale/polyfill');


  require('@formatjs/intl-pluralrules/polyfill');
  require('@formatjs/intl-pluralrules/locale-data/en.js'); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT

  require('@formatjs/intl-displaynames/polyfill');
  require('@formatjs/intl-displaynames/locale-data/en.js'); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
  
  require('@formatjs/intl-listformat/polyfill');
  require('@formatjs/intl-listformat/locale-data/en.js'); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
  
  require('@formatjs/intl-numberformat/polyfill');
  require('@formatjs/intl-numberformat/locale-data/en.js'); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT
  
  require('@formatjs/intl-relativetimeformat/polyfill');
  require('@formatjs/intl-relativetimeformat/locale-data/en.js'); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT

  require('@formatjs/intl-datetimeformat/polyfill');
  require('@formatjs/intl-datetimeformat/locale-data/en.js'); // USE YOUR OWN LANGUAGE OR MULTIPLE IMPORTS YOU WANT TO SUPPORT

  require('@formatjs/intl-datetimeformat/add-golden-tz.js');



  // https://formatjs.io/docs/polyfills/intl-datetimeformat/#default-timezone
  let RNLocalize = require('react-native-localize');
  if ('__setDefaultTimeZone' in Intl.DateTimeFormat) {
    Intl.DateTimeFormat.__setDefaultTimeZone(RNLocalize.getTimeZone());
  }
}

Source: formatjs.io/docs/polyfills

Schermafbeelding 2021-01-20 om 21 21 43

note

20 Jan 20:36
ca48c21
Compare
Choose a tag to compare
Update README.md

Release 0.2.14

08 Jan 10:44
Compare
Choose a tag to compare

0.2.14 (2021-01-08)

Bug Fixes