Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@iroomit/react-date-range

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iroomit/react-date-range - npm Package Compare versions

Comparing version 3.0.0-alpha.1 to 3.0.0

22

CHANGELOG.md

@@ -7,2 +7,24 @@ # Changelog

## 3.0.0
### Changed
- Project development taken over by iROOMit Inc!
- All components rewritten in TypeScript
- Class components converted to functional components
- Rewrote all PropTypes declarations as TypeScript type definitions
- `date-fns` dependency upgraded to v3
- `Webpack` upgraded to v5
- Upgraded `Babel`, `Jest`, `React` dependencies to latest versions
- Removed `shallow-equal` dependency in favour of built-in `JSON.stringify()`
### To Do
- Convert demo project to TypeScript
- Convert tests to TypeScript
Going forward, any changes should reference cooresponding commit IDs. Because this version marks a takeover and entire rewrite of the project, commit IDs have been omitted due to various changes taking place over several commits.
**This should not be a breaking release. All previous props and components from this library are still valid after the TypeScript rewrite.**
## 1.4.0

@@ -9,0 +31,0 @@

6

dist/index.d.ts

@@ -1,5 +0,5 @@

export { default as DateRange } from './components/DateRange';
export { default as Calendar } from './components/Calendar';
export { default as DateRangePicker } from './components/DateRangePicker';
export { default as DateRange, type DateRangeProps } from './components/DateRange';
export { default as Calendar, type CalendarProps } from './components/Calendar';
export { default as DateRangePicker, type DateRangePickerProps } from './components/DateRangePicker';
export { default as DefinedRange } from './components/DefinedRange';
export { defaultInputRanges, defaultStaticRanges, createStaticRanges } from './defaultRanges';

@@ -54,2 +54,2 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfRGF0ZVJhbmdlIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfQ2FsZW5kYXIiLCJfRGF0ZVJhbmdlUG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ozs7O0FBQUEsSUFBQUEsVUFBQSxHQUFBQyxzQkFBQSxDQUFBQyxPQUFBO0FBQ0EsSUFBQUMsU0FBQSxHQUFBRixzQkFBQSxDQUFBQyxPQUFBO0FBQ0EsSUFBQUUsZ0JBQUEsR0FBQUgsc0JBQUEsQ0FBQUMsT0FBQTtBQUNBLElBQUFHLGFBQUEsR0FBQUosc0JBQUEsQ0FBQUMsT0FBQTtBQUNBLElBQUFJLGNBQUEsR0FBQUosT0FBQTtBQUE4RixTQUFBRCx1QkFBQU0sR0FBQSxXQUFBQSxHQUFBLElBQUFBLEdBQUEsQ0FBQUMsVUFBQSxHQUFBRCxHQUFBLEtBQUFFLE9BQUEsRUFBQUYsR0FBQSJ9
import { WeekOptions } from 'date-fns';
import { StylesType } from './styles';
import { DateRange } from './components/DayCell';
export declare function calcFocusDate(currentFocusedDate: Date, shownDate?: Date, date?: Date, months?: number, ranges?: DateRange[], focusedRange?: number[], displayMode?: "dateRange" | "date"): any;
export declare function calcFocusDate(currentFocusedDate: Date, shownDate?: Date, date?: Date, months?: number, ranges?: DateRange[], focusedRange?: number[], displayMode?: "dateRange" | "date"): Date;
export declare function findNextRangeIndex(ranges: DateRange[], currentRangeIndex?: number): number;

@@ -6,0 +6,0 @@ export declare function getMonthDisplayRange(date: Date, dateOptions?: WeekOptions, fixedHeight?: boolean): {

@@ -19,14 +19,14 @@ "use strict";

targetInterval = {
start: range?.startDate,
end: range?.endDate
startDate: range?.startDate,
endDate: range?.endDate
};
} else {
targetInterval = {
start: date,
end: date
startDate: date,
endDate: date
};
}
targetInterval.start = (0, _dateFns.startOfMonth)(targetInterval.start || new Date());
targetInterval.end = (0, _dateFns.endOfMonth)(targetInterval.end || targetInterval.start);
const targetDate = targetInterval.start || targetInterval.end || shownDate || new Date();
targetInterval.startDate = (0, _dateFns.startOfMonth)(targetInterval.startDate || new Date());
targetInterval.endDate = (0, _dateFns.endOfMonth)(targetInterval.endDate || targetInterval.startDate);
const targetDate = targetInterval.startDate || targetInterval.endDate || shownDate || new Date();

@@ -38,3 +38,3 @@ // initial focus

// if (scroll.enabled) return targetDate;
if ((0, _dateFns.differenceInCalendarMonths)(targetInterval.start, targetInterval.end) > months) {
if ((0, _dateFns.differenceInCalendarMonths)(targetInterval.startDate, targetInterval.endDate) > months) {
// don't change focused if new selection in view area

@@ -76,2 +76,2 @@ return currentFocusedDate;

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfY2xhc3NuYW1lcyIsIl9pbnRlcm9wUmVxdWlyZURlZmF1bHQiLCJyZXF1aXJlIiwiX2RhdGVGbnMiLCJvYmoiLCJfX2VzTW9kdWxlIiwiZGVmYXVsdCIsImNhbGNGb2N1c0RhdGUiLCJjdXJyZW50Rm9jdXNlZERhdGUiLCJzaG93bkRhdGUiLCJkYXRlIiwibW9udGhzIiwicmFuZ2VzIiwiZm9jdXNlZFJhbmdlIiwiZGlzcGxheU1vZGUiLCJ0YXJnZXRJbnRlcnZhbCIsInJhbmdlIiwic3RhcnQiLCJzdGFydERhdGUiLCJlbmQiLCJlbmREYXRlIiwic3RhcnRPZk1vbnRoIiwiRGF0ZSIsImVuZE9mTW9udGgiLCJ0YXJnZXREYXRlIiwiZGlmZmVyZW5jZUluQ2FsZW5kYXJNb250aHMiLCJmaW5kTmV4dFJhbmdlSW5kZXgiLCJjdXJyZW50UmFuZ2VJbmRleCIsImFyZ3VtZW50cyIsImxlbmd0aCIsInVuZGVmaW5lZCIsIm5leHRJbmRleCIsImZpbmRJbmRleCIsImkiLCJhdXRvRm9jdXMiLCJkaXNhYmxlZCIsImdldE1vbnRoRGlzcGxheVJhbmdlIiwiZGF0ZU9wdGlvbnMiLCJmaXhlZEhlaWdodCIsInN0YXJ0RGF0ZU9mTW9udGgiLCJlbmREYXRlT2ZNb250aCIsInN0YXJ0RGF0ZU9mQ2FsZW5kYXIiLCJzdGFydE9mV2VlayIsImVuZERhdGVPZkNhbGVuZGFyIiwi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xFQUFFSixXQUFXLENBQUNJLEdBQUcsQ0FBQyxDQUFDO0lBQ3pELENBQUMsQ0FBQztJQUNGLE9BQU9MLE1BQU07RUFDZixDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7RUFDUixPQUFPTCxlQUFlO0FBQ3hCIn0=
{
"name": "@iroomit/react-date-range",
"version": "3.0.0-alpha.1",
"version": "3.0.0",
"description": "A React component for choosing dates and date ranges.",

@@ -84,3 +84,3 @@ "main": "dist/index.js",

"postcss-import": "^16.0.0",
"postcss-loader": "^7.3.4",
"postcss-loader": "^8.0.0",
"prettier": "^3.1.1",

@@ -87,0 +87,0 @@ "react": "^18.0.0",

# @iroomit/react-date-range
[![npm](https://img.shields.io/npm/v/react-date-range)](https://www.npmjs.com/package/react-date-range)
[![npm](https://img.shields.io/npm/l/react-date-range)]()
[![npm](https://img.shields.io/npm/dw/react-date-range)](https://www.npmjs.com/package/react-date-range)
[![sponsors](https://img.shields.io/github/sponsors/hypeserver)](https://github.com/sponsors/hypeserver)
[![npm](https://img.shields.io/npm/v/@iroomit/react-date-range)](https://www.npmjs.com/package/@iroomit/react-date-range)
[![npm](https://img.shields.io/npm/l/@iroomit/react-date-range)]()
[![npm](https://img.shields.io/npm/dw/@iroomit/react-date-range)](https://www.npmjs.com/package/react-date-range)

@@ -14,4 +13,6 @@

This fork aims at keeping this project alive. Dependencies have been upgraded, class components updated to function components and the entire project has been rewritten in TypeScript. Some of the code has also been optimized further with newer React features.
This fork aims at keeping this project alive!
Dependencies have been upgraded, class components updated to function components and the entire project has been rewritten in TypeScript. Some of the code has also been optimized further with newer React features.
### Why should you use `@iroomit/react-date-range`?

@@ -26,8 +27,9 @@

- Keyboard friendly
- TypeScript support
- Built-in TypeScript support
**Live Demo :** [http://hypeserver.github.io/react-date-range](http://hypeserver.github.io/react-date-range)
**Live Demo :** [http://iroomitapp.github.io/react-date-range](http://iroomitapp.github.io/react-date-range)
![](https://raw.githubusercontent.com/hypeserver/react-date-range/master/demo/ss.png)
![](https://raw.githubusercontent.com/iroomitapp/react-date-range/master/demo/ss.png)
`@iroomit/react-date-range` is also used in production on [iROOMit Roommates & Rooms Finder website](https://www.iroomit.com/).

@@ -60,2 +62,8 @@ ## Getting Started

or
```
yarn add react date-fns
```
## Usage

@@ -168,4 +176,4 @@

renderStaticRangeLabel(`DefinedRange`)| Function | | Callback function to be triggered for the static range configurations that have `hasCustomRendering: true` on them. Instead of rendering `staticRange.label`, return value of this callback will be rendered.
staticRanges(`DefinedRange`, `DateRangePicker`) | Array | [default preDefined ranges](https://github.com/hypeserver/react-date-range/blob/master/src/defaultRanges.js) | -
inputRanges(`DefinedRange`, `DateRangePicker`) | Array | [default input ranges](https://github.com/hypeserver/react-date-range/blob/master/src/defaultRanges.js) | -
staticRanges(`DefinedRange`, `DateRangePicker`) | Array | [default preDefined ranges](https://github.com/iroomitapp/react-date-range/blob/master/src/defaultRanges.ts) | -
inputRanges(`DefinedRange`, `DateRangePicker`) | Array | [default input ranges](https://github.com/iroomitapp/react-date-range/blob/master/src/defaultRanges.ts) | -
ariaLabels | Object | {} | inserts aria-label to inner elements

@@ -172,0 +180,0 @@ dayContentRenderer | Function | null | Function to customize the rendering of Calendar Day. given a date is supposed to return what to render.

@@ -1,5 +0,5 @@

export { default as DateRange } from './components/DateRange';
export { default as Calendar } from './components/Calendar';
export { default as DateRangePicker } from './components/DateRangePicker';
export { default as DateRange, type DateRangeProps } from './components/DateRange';
export { default as Calendar, type CalendarProps } from './components/Calendar';
export { default as DateRangePicker, type DateRangePickerProps } from './components/DateRangePicker';
export { default as DefinedRange } from './components/DefinedRange';
export { defaultInputRanges, defaultStaticRanges, createStaticRanges } from './defaultRanges';

@@ -17,18 +17,18 @@ import classnames from 'classnames';

// find primary date according the props
let targetInterval;
let targetInterval: DateRange;
if (displayMode === 'dateRange') {
const range = ranges[focusedRange[0]];
targetInterval = {
start: range?.startDate,
end: range?.endDate,
startDate: range?.startDate,
endDate: range?.endDate,
};
} else {
targetInterval = {
start: date,
end: date,
startDate: date,
endDate: date,
};
}
targetInterval.start = startOfMonth(targetInterval.start || new Date());
targetInterval.end = endOfMonth(targetInterval.end || targetInterval.start);
const targetDate = targetInterval.start || targetInterval.end || shownDate || new Date();
targetInterval.startDate = startOfMonth(targetInterval.startDate || new Date());
targetInterval.endDate = endOfMonth(targetInterval.endDate || targetInterval.startDate);
const targetDate = targetInterval.startDate || targetInterval.endDate || shownDate || new Date();

@@ -40,3 +40,3 @@ // initial focus

// if (scroll.enabled) return targetDate;
if (differenceInCalendarMonths(targetInterval.start, targetInterval.end) > months) {
if (differenceInCalendarMonths(targetInterval.startDate, targetInterval.endDate) > months) {
// don't change focused if new selection in view area

@@ -43,0 +43,0 @@ return currentFocusedDate;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc