├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .npmignore
├── .npmrc
├── .prettierignore
├── .storybook
├── main.js
├── manager.js
└── theme.js
├── .travis.yml
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── babel.config.js
├── dist
├── index.d.ts
├── index.d.ts.map
├── index.es.js
├── index.es.js.map
├── index.js
└── index.js.map
├── docs
├── 229.f5977af42d664affe404.manager.bundle.js
├── 28.eaf1594843a37e65492e.manager.bundle.js
├── 28.eaf1594843a37e65492e.manager.bundle.js.LICENSE.txt
├── 295.87668df083831d3d6399.manager.bundle.js
├── 38.cf190100.iframe.bundle.js
├── 38.cf190100.iframe.bundle.js.LICENSE.txt
├── 51.94ab232695a89240eba0.manager.bundle.js
├── 51.94ab232695a89240eba0.manager.bundle.js.LICENSE.txt
├── 551.5b80c598a88ead76a32a.manager.bundle.js
├── 701.0350a9c3.iframe.bundle.js
├── 745.30e61d6f.iframe.bundle.js
├── 807.9cdb6310ad57fd2e91e1.manager.bundle.js
├── 807.9cdb6310ad57fd2e91e1.manager.bundle.js.LICENSE.txt
├── 897.625210eaaa3c9980fc12.manager.bundle.js
├── 897.625210eaaa3c9980fc12.manager.bundle.js.LICENSE.txt
├── 935.95edb50b7de67d965a21.manager.bundle.js
├── favicon.ico
├── iframe.html
├── index.html
├── main.10dc05af.iframe.bundle.js
├── main.a20862c8c00eaecdc189.manager.bundle.js
├── project.json
├── runtime~main.034739fce0fb7c30839b.manager.bundle.js
└── runtime~main.a7fea967.iframe.bundle.js
├── jest.config.js
├── package-lock.json
├── package.json
├── rollup.config.js
├── scripts
└── build-options.js
├── src
├── __snapshots__
│ └── index.test.js.snap
├── __testutil__
│ └── setup.js
├── index.stories.js
├── index.test.js
└── index.tsx
└── tsconfig.json
/.eslintignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | dist/
3 | docs/
4 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | env: {
3 | browser: true,
4 | es6: true,
5 | jest: true,
6 | node: true,
7 | },
8 | extends: [
9 | 'eslint:recommended',
10 | 'plugin:react/recommended',
11 | 'plugin:jsx-a11y/recommended',
12 | 'plugin:storybook/recommended',
13 | ],
14 | parser: 'babel-eslint',
15 | parserOptions: {
16 | sourceType: 'module',
17 | },
18 | plugins: ['react', 'jsx-a11y'],
19 | rules: {
20 | indent: ['error', 2],
21 | 'no-var': 'error',
22 | 'one-var': ['error', 'never'],
23 | 'prefer-const': 'error',
24 | 'react/sort-comp': 'error',
25 | quotes: ['error', 'single'],
26 | },
27 | };
28 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | _ignore/
3 | coverage/
4 | node_modules/
5 | .DS_Store
6 | .npm-debug.log
7 | .project
8 | yarn*
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .git*
2 | _ignore/
3 | demo/
4 | test/
5 | www/
6 | .DS_Store
7 | .gitignore
8 | .npm-debug.log
9 | .project
10 | .travis.yml
11 | npm-debug.log
12 | TODO.md
13 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | legacy-peer-deps=true
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | coverage/
2 | dist/
3 | docs/
4 | node_modules/
5 |
--------------------------------------------------------------------------------
/.storybook/main.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | stories: ['../src/**/*.stories.js'],
3 | addons: [
4 | '@storybook/addon-actions',
5 | '@storybook/addon-knobs',
6 | '@storybook/addon-storysource',
7 | ],
8 | typescript: {
9 | check: false,
10 | checkOptions: {},
11 | reactDocgen: 'react-docgen-typescript',
12 | reactDocgenTypescriptOptions: {
13 | shouldExtractLiteralValuesFromEnum: true,
14 | propFilter: (prop) =>
15 | prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
16 | },
17 | },
18 | core: {
19 | builder: 'webpack5',
20 | },
21 | framework: '@storybook/react',
22 | };
23 |
--------------------------------------------------------------------------------
/.storybook/manager.js:
--------------------------------------------------------------------------------
1 | import { addons } from '@storybook/addons';
2 | import theme from './theme';
3 |
4 | addons.setConfig({ theme });
5 |
--------------------------------------------------------------------------------
/.storybook/theme.js:
--------------------------------------------------------------------------------
1 | import { create } from '@storybook/theming';
2 | import pkg from '../package.json';
3 |
4 | export default create({
5 | base: 'light',
6 | brandTitle: `${pkg.name} v${pkg.version}`,
7 | brandUrl: pkg.homepage,
8 | });
9 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: required
2 | language: node_js
3 | node_js:
4 | - "node"
5 | - "14"
6 | - "12"
7 | - "10"
8 | script:
9 | - npm run build
10 | - npm run coveralls
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## [8.0.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/8.0.0) (2022-08-24)
4 |
5 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/7.0.0...8.0.0)
6 |
7 | **Closed issues:**
8 |
9 | - Change default active class [\#246](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/246)
10 | - singleDatePicker Attribute Not Working [\#240](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/240)
11 | - parentEl in initialSettings - How to use [\#239](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/239)
12 | - How to prevent user from not selecting date more than a week [\#238](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/238)
13 | - Get name of predefined range as a prop [\#236](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/236)
14 | - I'm trying to use the showCustomRangeLabel option as true but it has no effect [\#234](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/234)
15 | - How to set max date [\#233](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/233)
16 | - Date range picker input box doesn't show up calendar icon ? [\#229](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/229)
17 | - How to pass maxspan of 31 days for allowing max range of 31 days between start and end dates? [\#227](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/227)
18 | - How do i allow apply on only selecting start date? [\#226](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/226)
19 | - TS definitions broken since the `initialSettings` change. [\#224](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/224)
20 |
21 | **Merged pull requests:**
22 |
23 | - react 18 fixes [\#257](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/257) ([danhab99](https://github.com/danhab99))
24 | - updating dependencies [\#237](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/237) ([skratchdot](https://github.com/skratchdot))
25 |
26 | ## [7.0.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/7.0.0) (2020-08-12)
27 |
28 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/7.0.0-beta.1...7.0.0)
29 |
30 | ## [7.0.0-beta.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/7.0.0-beta.1) (2020-08-11)
31 |
32 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/7.0.0-beta.0...7.0.0-beta.1)
33 |
34 | ## [7.0.0-beta.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/7.0.0-beta.0) (2020-08-11)
35 |
36 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/6.0.0...7.0.0-beta.0)
37 |
38 | **Closed issues:**
39 |
40 | - Specifying the language [\#218](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/218)
41 | - singleDatePicker - Change date from input. [\#217](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/217)
42 | - singleDatePicker shows range of dates when date is changed dynamically [\#211](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/211)
43 | - end date active error [\#210](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/210)
44 | - accessibility support or keyboard navigation is not supported [\#207](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/207)
45 | - how can i put checkbox inside calender [\#205](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/205)
46 | - Calendar jumps to start date after selecting end date in range selection [\#202](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/202)
47 | - this.props undefined [\#201](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/201)
48 | - V4 is unusable with inputs [\#200](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/200)
49 | - showDropdown/timePicker failing [\#199](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/199)
50 | - How to set date range only for startDate [\#198](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/198)
51 | - Customise Range selection [\#197](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/197)
52 | - Calendar opens and closes on each input event [\#195](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/195)
53 | - startDate should be always set before endDate [\#194](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/194)
54 | - The NPM package does not match the Github code [\#193](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/193)
55 | - How can I customise the calendar? [\#192](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/192)
56 | - Property applyButtonClasses, cancelButtonClasses not apply [\#191](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/191)
57 | - autoUpdateInput - Unknown props `autoUpdateInput`, `singleDatePicker`, `startDate` on \
tag. Remove these props from the element. [\#190](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/190)
58 | - Uncaught ReferenceError: DateRangePicker is not defined [\#189](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/189)
59 | - minDate is not working [\#187](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/187)
60 | - Can you please update react-bootstrap-daterangepicker to react 16 , we are in dire need of it, thanks a mil [\#186](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/186)
61 | - How do I manually enter a date using the daterangepicker@3.0.3? [\#185](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/185)
62 | - endDate dose not work. [\#184](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/184)
63 | - this.$picker.daterangepicker is not a function error while running Jest test cases [\#183](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/183)
64 | - Problem with using in window.open [\#182](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/182)
65 | - TypeError: Cannot read property 'any' of undefined [\#181](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/181)
66 | - Selected range always showing 'Custom' when 'timePickerSeconds' is true [\#180](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/180)
67 | - Is there any way to provide an input box instead of a button? [\#179](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/179)
68 | - How to disable future TIME in TimePicker? [\#178](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/178)
69 | - Please add minYear and maxYear to the properties [\#177](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/177)
70 | - Update startDate endDate [\#176](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/176)
71 | - How to get input boxes at the top of the calendar [\#175](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/175)
72 | - Uncaught TypeError: moment is not a function [\#174](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/174)
73 | - calenders showing up stacked vertically instead of horizontally [\#173](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/173)
74 | - Issues using react-bootstrap-daterangepicker with redux-form [\#172](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/172)
75 | - Can't resolve 'bootstrap-daterangepicker' [\#171](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/171)
76 | - Style should not be set by default. [\#170](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/170)
77 | - Daterangepicker appending to body. Not able to append it to div element? [\#168](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/168)
78 | - Issue with React v16.2.0 [\#166](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/166)
79 | - Glyphicon not working correctly - Edit \(Glyphicon is no longer supported in bs4\) [\#161](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/161)
80 | - Month picker [\#155](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/155)
81 | - Enabling preact breaks the daterange picker. [\#152](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/152)
82 | - How to make DateRangePicker as an inline component \( show always and not on input focus\) ? Also, How to display only one calendar for start and end date ? [\#151](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/151)
83 | - Element Type Is Invalid [\#148](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/148)
84 | - Dropdown Menu Broken in Dialog [\#147](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/147)
85 | - 3.4.0 broke usage with multiple children nodes [\#146](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/146)
86 | - Add className to datepicker? [\#141](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/141)
87 | - breaks for me in v3.4.0 [\#140](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/140)
88 | - Warning: Stateless function components cannot be given refs \(See ref "picker" in Input created by null\). Attempts to access this ref will fail. [\#138](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/138)
89 | - Getting Expected onMountComponent\(\) to fire for the child before its parent includes it in onSetChildren\(\). [\#137](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/137)
90 | - autoApply property doesn't work [\#131](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/131)
91 | - opens "left" doesn't work for me [\#127](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/127)
92 | - when we install this package, we get all the locale files , I just need locale file for english, how do we fix it ? [\#125](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/125)
93 | - Can't set singleDatePicker dynamically [\#123](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/123)
94 | - Mobile Support props [\#122](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/122)
95 | - chosenLabel property is not reset on new `apply` event and stores value of previous selection [\#120](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/120)
96 | - How to set "xs" class for button? [\#119](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/119)
97 | - How to make Custom Range preselected and calendars always shown? [\#118](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/118)
98 | - Uncaught \(in promise\) TypeError: $this.$picker.daterangepicker is not a function [\#117](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/117)
99 | - 34Uncaught \(in promise\) TypeError: moment is not a function\(…\) [\#116](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/116)
100 | - Dublicated startDate [\#114](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/114)
101 | - onApply is not fired [\#112](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/112)
102 | - autoApply does not hide Apply and Cancel buttons. [\#111](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/111)
103 | - Browser build [\#95](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/95)
104 | - autoApply not working [\#91](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/91)
105 | - Bootstrap form-control classes for timePicker selects [\#88](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/88)
106 | - Can't modify format of custum range endDate and startDate [\#83](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/83)
107 | - setOptionsFromProps creates wrong param order [\#82](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/82)
108 | - Deprecation warning: moment construction falls back to js Date [\#77](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/77)
109 | - Uncaught Invariant Violation: addComponentAsRefTo\(...\): [\#69](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/69)
110 | - error when pass props parentEl to string "\#some-div-id" [\#67](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/67)
111 | - Error when you pass null-s to startDate and EndDate [\#65](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/65)
112 | - Add global.jQuery = $ to index.js [\#60](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/60)
113 | - Missing documentation for "timeZone" parameter [\#59](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/59)
114 | - Global MomentJS locale setting is ignored [\#57](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/57)
115 | - partial param in locale case error [\#53](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/53)
116 | - Is it possible to support disabled={true} [\#52](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/52)
117 | - Error with React 0.14 + Changing Properties [\#51](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/51)
118 | - If the element under the \
has float attribute, the container top position is not right [\#50](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/50)
119 | - How Calendar is Displayed [\#48](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/48)
120 | - Uncaught TypeError: this.parentEl.is is not a function [\#46](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/46)
121 | - Can not be used in the case of jquery 2.1.4 [\#45](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/45)
122 | - Option props not being set properly on render [\#44](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/44)
123 | - Cannot set property 'daterangepicker' of undefined [\#43](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/43)
124 | - Uncaught TypeError: $this.$picker.daterangepicker is not a function [\#42](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/42)
125 | - Typing dates in custom ranges are too sensitive [\#30](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/30)
126 | - Version without jQuery [\#29](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/29)
127 | - How to close a modal by a funciton [\#17](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/17)
128 | - Server rendering: TypeError: Cannot read property 'document' of undefined [\#14](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/14)
129 | - Question: Use as content of modal body? [\#6](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/6)
130 |
131 | ## [6.0.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/6.0.0) (2020-07-26)
132 |
133 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/5.0.1...6.0.0)
134 |
135 | **Closed issues:**
136 |
137 | - onApply event not triggering in v5 [\#223](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/223)
138 | - Event onApply not working with version bootstrap-daterangepicker 3.1.0 [\#222](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/222)
139 | - Module '"react-bootstrap-daterangepicker"' can only be default-imported using the 'allowSyntheticDefaultImports' flag [\#220](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/220)
140 | - Updating `ranges` prop does not update the date ranger picker UI [\#215](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/215)
141 | - Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps [\#214](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/214)
142 | - There is no maxSpan option [\#203](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/203)
143 | - Compatible w/ bootstrap-daterangepicker \>= 3.0.2? [\#188](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/188)
144 |
145 | **Merged pull requests:**
146 |
147 | - Update index.js [\#219](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/219) ([diego-betto](https://github.com/diego-betto))
148 |
149 | ## [5.0.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/5.0.1) (2020-07-24)
150 |
151 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/5.0.0...5.0.1)
152 |
153 | ## [5.0.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/5.0.0) (2020-07-16)
154 |
155 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/4.1.0...5.0.0)
156 |
157 | **Closed issues:**
158 |
159 | - Ranges dates are starting always from start of day [\#221](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/221)
160 | - Right now we need to add bootstrap separately, can it exist as a peer-dependency? [\#213](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/213)
161 | - Timepicker does not display time in the footer [\#212](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/212)
162 | - How can I pass dynamic locale for dateRangePicker When I use 'moment/min/locales' working instead of moment [\#196](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/196)
163 | - Module not found: Can't resolve 'bootstrap-daterangepicker' [\#169](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/169)
164 | - Show Date time picker and predefined range the same time [\#167](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/167)
165 | - TypeError: Cannot set property 'parentEl' of undefined [\#165](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/165)
166 | - d demo [\#160](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/160)
167 | - support for react 16 [\#157](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/157)
168 | - daterangepicker.js:13 Uncaught TypeError: Cannot set property 'daterangepicker' of undefined [\#154](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/154)
169 | - Menu Starts Open [\#149](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/149)
170 | - Cannot find module 'jquery [\#143](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/143)
171 |
172 | **Merged pull requests:**
173 |
174 | - Re rendering DOM node with updated state data [\#216](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/216) ([rehanumar](https://github.com/rehanumar))
175 |
176 | ## [4.1.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/4.1.0) (2018-02-09)
177 |
178 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/4.0.1...4.1.0)
179 |
180 | **Closed issues:**
181 |
182 | - YarikST [\#164](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/164)
183 |
184 | ## [4.0.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/4.0.1) (2018-02-05)
185 |
186 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/3.4.1...4.0.1)
187 |
188 | **Closed issues:**
189 |
190 | - Module build failed: Error: Couldn't find preset "stage-0" relative to directory [\#162](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/162)
191 | - showCustomRangeLabel = false does not seem to be working. [\#159](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/159)
192 | - Saturday column falling outside of white border on right calendar and hidden on left. [\#153](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/153)
193 |
194 | **Merged pull requests:**
195 |
196 | - fix\(\): Cannot read property 'remove' of undefined [\#158](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/158) ([nicubarbaros](https://github.com/nicubarbaros))
197 | - Fix Component Displayname in React Dev Tools [\#142](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/142) ([atkawa7](https://github.com/atkawa7))
198 |
199 | ## [3.4.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/3.4.1) (2017-08-23)
200 |
201 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/3.4.0...3.4.1)
202 |
203 | **Closed issues:**
204 |
205 | - React 15.6.1 update [\#145](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/145)
206 | - maxDate not working [\#144](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/144)
207 | - \[deleted\] [\#136](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/136)
208 | - Can't resolve 'create-react-class' after update to 3.4.0 [\#134](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/134)
209 |
210 | **Merged pull requests:**
211 |
212 | - fix `isCustomDate` proptype [\#150](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/150) ([yashksagar](https://github.com/yashksagar))
213 | - add instruction to install peer dependencies in readme [\#135](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/135) ([barbalex](https://github.com/barbalex))
214 |
215 | ## [3.4.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/3.4.0) (2017-05-18)
216 |
217 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/3.3.0...3.4.0)
218 |
219 | **Closed issues:**
220 |
221 | - Release [\#132](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/132)
222 | - Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead. [\#128](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/128)
223 | - React.createClass deprecated now. react-bootstrap-daterangepicker will be incompatible with React 16 [\#126](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/126)
224 |
225 | **Merged pull requests:**
226 |
227 | - Setup the date range picker on the child element directly [\#79](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/79) ([remiremi](https://github.com/remiremi))
228 |
229 | ## [3.3.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/3.3.0) (2017-05-18)
230 |
231 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/2.1.1...3.3.0)
232 |
233 | **Closed issues:**
234 |
235 | - Display calendar above element [\#115](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/115)
236 |
237 | **Merged pull requests:**
238 |
239 | - Fixed prop-types and createClass issues [\#129](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/129) ([thevikas](https://github.com/thevikas))
240 |
241 | ## [2.1.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/2.1.1) (2016-10-07)
242 |
243 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/2.2.0...2.1.1)
244 |
245 | **Closed issues:**
246 |
247 | - v2.1.0 [\#92](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/92)
248 |
249 | ## [2.2.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/2.2.0) (2016-10-06)
250 |
251 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/2.1.0...2.2.0)
252 |
253 | **Closed issues:**
254 |
255 | - Is it possible to mount the daterangepicker within a given DOM node? [\#104](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/104)
256 | - React 15.2.1 deprecation warning [\#80](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/80)
257 |
258 | ## [2.1.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/2.1.0) (2016-09-10)
259 |
260 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/3.2.2...2.1.0)
261 |
262 | ## [3.2.2](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/3.2.2) (2016-09-10)
263 |
264 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.1.0...3.2.2)
265 |
266 | ## [1.1.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.1.0) (2016-09-10)
267 |
268 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/3.2.1...1.1.0)
269 |
270 | **Closed issues:**
271 |
272 | - autoApply doesn't hide apply and cancel buttons [\#89](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/89)
273 |
274 | ## [3.2.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/3.2.1) (2016-08-26)
275 |
276 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/3.2.0...3.2.1)
277 |
278 | **Closed issues:**
279 |
280 | - Errors when placing startDate, endDate, and ranges on DataRangePicker component [\#84](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/84)
281 |
282 | **Merged pull requests:**
283 |
284 | - Added showCustomRangeLabel to PropTypes [\#87](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/87) ([rmdort](https://github.com/rmdort))
285 |
286 | ## [3.2.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/3.2.0) (2016-08-26)
287 |
288 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/3.1.0...3.2.0)
289 |
290 | **Closed issues:**
291 |
292 | - Release new version and update package on npm [\#78](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/78)
293 |
294 | **Merged pull requests:**
295 |
296 | - Add showCustomRangeLabel option [\#86](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/86) ([rmdort](https://github.com/rmdort))
297 | - Don't pass own props to the div [\#85](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/85) ([just-paja](https://github.com/just-paja))
298 |
299 | ## [3.1.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/3.1.0) (2016-06-01)
300 |
301 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/3.0.0...3.1.0)
302 |
303 | **Closed issues:**
304 |
305 | - minDate breaks [\#75](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/75)
306 | - React v15.0 no longer support React.\_\_spread [\#71](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/71)
307 | - React.\_\_spread is not a function after upgrade to React 15.0.0 [\#70](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/70)
308 |
309 | **Merged pull requests:**
310 |
311 | - fix props overwriting locale [\#76](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/76) ([kibin](https://github.com/kibin))
312 | - Use setStart/EndDate\(\) when respective props change [\#74](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/74) ([drd](https://github.com/drd))
313 | - Only update options from props when props change [\#73](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/73) ([drd](https://github.com/drd))
314 |
315 | ## [3.0.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/3.0.0) (2016-04-11)
316 |
317 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/2.0.0...3.0.0)
318 |
319 | **Closed issues:**
320 |
321 | - How to build a "dist" version [\#68](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/68)
322 | - Can you release 2.0.0? [\#61](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/61)
323 |
324 | ## [2.0.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/2.0.0) (2016-03-14)
325 |
326 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.6...2.0.0)
327 |
328 | **Closed issues:**
329 |
330 | - \["jquery": "\>=1.10"\] update bootstrap-daterangepicker@2.1.18 [\#64](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/64)
331 | - Missing alwaysShowCalendars in ./lib/get-options.js [\#62](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/62)
332 | - Uncaught Error: Cannot find module 'react-bootstrap-daterangepicker' [\#55](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/55)
333 | - Date and Time range picker [\#54](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/54)
334 | - If the element under the \ has float attribute, the container top position is not right [\#49](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/49)
335 |
336 | **Merged pull requests:**
337 |
338 | - fix \#64, support jquery2 [\#66](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/66) ([luqin](https://github.com/luqin))
339 | - Add an option\("alwaysShowCalendars"\) - Update get-options.js [\#63](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/63) ([carlsagan21](https://github.com/carlsagan21))
340 | - remount daterangepicker on rerender [\#56](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/56) ([spinloop](https://github.com/spinloop))
341 |
342 | ## [1.0.6](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.6) (2015-11-23)
343 |
344 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.5...1.0.6)
345 |
346 | ## [1.0.5](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.5) (2015-11-17)
347 |
348 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.4...1.0.5)
349 |
350 | **Merged pull requests:**
351 |
352 | - Correct for existing window.jQuery instances [\#47](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/47) ([EyePulp](https://github.com/EyePulp))
353 |
354 | ## [1.0.4](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.4) (2015-11-02)
355 |
356 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.3...1.0.4)
357 |
358 | ## [1.0.3](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.3) (2015-10-26)
359 |
360 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.2...1.0.3)
361 |
362 | **Closed issues:**
363 |
364 | - have an error with new version [\#41](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/41)
365 |
366 | ## [1.0.2](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.2) (2015-10-19)
367 |
368 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.1...1.0.2)
369 |
370 | ## [1.0.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.1) (2015-10-09)
371 |
372 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.0...1.0.1)
373 |
374 | **Merged pull requests:**
375 |
376 | - fix dependencies [\#40](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/40) ([oliger](https://github.com/oliger))
377 |
378 | ## [1.0.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.0) (2015-10-08)
379 |
380 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.0-beta.3...1.0.0)
381 |
382 | ## [1.0.0-beta.3](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.0-beta.3) (2015-10-07)
383 |
384 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.0-beta.2...1.0.0-beta.3)
385 |
386 | **Closed issues:**
387 |
388 | - Uncaught TypeError: Cannot set property 'daterangepicker' of undefined [\#34](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/34)
389 |
390 | ## [1.0.0-beta.2](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.0-beta.2) (2015-10-06)
391 |
392 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/1.0.0-beta.1...1.0.0-beta.2)
393 |
394 | **Closed issues:**
395 |
396 | - Wrong date returned [\#11](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/11)
397 |
398 | ## [1.0.0-beta.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/1.0.0-beta.1) (2015-09-29)
399 |
400 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.6.0...1.0.0-beta.1)
401 |
402 | **Closed issues:**
403 |
404 | - dependency not included as a dependency!! [\#36](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/36)
405 |
406 | **Merged pull requests:**
407 |
408 | - remove react-dom dependency [\#39](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/39) ([peter-mouland](https://github.com/peter-mouland))
409 | - Feature react 014 [\#32](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/32) ([skratchdot](https://github.com/skratchdot))
410 | - Feature react 014 [\#31](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/31) ([pierr](https://github.com/pierr))
411 |
412 | ## [0.6.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.6.0) (2015-09-23)
413 |
414 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.5.0...0.6.0)
415 |
416 | ## [0.5.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.5.0) (2015-09-16)
417 |
418 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.4.0...0.5.0)
419 |
420 | **Closed issues:**
421 |
422 | - Template in options [\#33](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/33)
423 |
424 | ## [0.4.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.4.0) (2015-09-11)
425 |
426 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.3.0...0.4.0)
427 |
428 | ## [0.3.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.3.0) (2015-08-17)
429 |
430 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.2.8...0.3.0)
431 |
432 | **Closed issues:**
433 |
434 | - Small housekeeping items? \(Documentation and console.log\) [\#25](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/25)
435 |
436 | **Merged pull requests:**
437 |
438 | - Pass 'autoApply' option to underlying component [\#27](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/27) ([flakekun](https://github.com/flakekun))
439 |
440 | ## [0.2.8](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.2.8) (2015-07-27)
441 |
442 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.2.7...0.2.8)
443 |
444 | **Closed issues:**
445 |
446 | - Cannot be used globally despite code that implies otherwise [\#22](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/22)
447 |
448 | **Merged pull requests:**
449 |
450 | - Remove console.log statement in componentDidMount [\#24](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/24) ([justinsisley](https://github.com/justinsisley))
451 | - getOptionsFromProps should never return undefined [\#23](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/23) ([justinsisley](https://github.com/justinsisley))
452 |
453 | ## [0.2.7](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.2.7) (2015-07-19)
454 |
455 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.2.6...0.2.7)
456 |
457 | **Closed issues:**
458 |
459 | - Disable calendar [\#21](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/21)
460 | - "drops" prop isn't working [\#20](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/20)
461 |
462 | ## [0.2.6](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.2.6) (2015-07-01)
463 |
464 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.2.5...0.2.6)
465 |
466 | **Closed issues:**
467 |
468 | - Upgrade bootstrap-daterangepicker to 1.3.22 [\#19](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/19)
469 | - How to enable the scroll bar in a modal? [\#18](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/18)
470 | - jQuery? [\#12](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/12)
471 |
472 | **Merged pull requests:**
473 |
474 | - Use jquery 1.11.3 compatible ie8 [\#16](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/16) ([codeos](https://github.com/codeos))
475 |
476 | ## [0.2.5](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.2.5) (2015-04-08)
477 |
478 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.2.4...0.2.5)
479 |
480 | **Closed issues:**
481 |
482 | - 0.2.3 -\> 0.2.4 drops support for React 0.12 [\#13](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/13)
483 |
484 | ## [0.2.4](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.2.4) (2015-04-02)
485 |
486 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.2.3...0.2.4)
487 |
488 | ## [0.2.3](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.2.3) (2015-03-04)
489 |
490 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.2.2...0.2.3)
491 |
492 | **Merged pull requests:**
493 |
494 | - allow react \>=0.13.0-beta.1 [\#10](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/10) ([mistadikay](https://github.com/mistadikay))
495 |
496 | ## [0.2.2](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.2.2) (2015-02-20)
497 |
498 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.2.1...0.2.2)
499 |
500 | **Closed issues:**
501 |
502 | - Deprecation warning: moment\(\).zone is deprecated [\#8](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/8)
503 |
504 | **Merged pull requests:**
505 |
506 | - moment.zone\(\) is depricated [\#9](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/9) ([Rudolph-Miller](https://github.com/Rudolph-Miller))
507 |
508 | ## [0.2.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.2.1) (2015-01-03)
509 |
510 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.2.0...0.2.1)
511 |
512 | ## [0.2.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.2.0) (2015-01-03)
513 |
514 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.1.2...0.2.0)
515 |
516 | **Closed issues:**
517 |
518 | - transferPropsTo is deprecated [\#7](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/7)
519 | - minDate alongside singleDatePicker option [\#5](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/5)
520 |
521 | ## [0.1.2](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.1.2) (2014-11-05)
522 |
523 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.1.1...0.1.2)
524 |
525 | **Merged pull requests:**
526 |
527 | - remove daterangepicker DOM element on componentWillUnmount [\#4](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/4) ([timc13](https://github.com/timc13))
528 |
529 | ## [0.1.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.1.1) (2014-10-28)
530 |
531 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.1.0...0.1.1)
532 |
533 | ## [0.1.0](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.1.0) (2014-10-28)
534 |
535 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.0.8...0.1.0)
536 |
537 | ## [0.0.8](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.0.8) (2014-10-28)
538 |
539 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.0.7...0.0.8)
540 |
541 | **Merged pull requests:**
542 |
543 | - Fix main entry point in package.json [\#3](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/3) ([sbellity](https://github.com/sbellity))
544 |
545 | ## [0.0.7](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.0.7) (2014-10-28)
546 |
547 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.0.6...0.0.7)
548 |
549 | **Closed issues:**
550 |
551 | - daterangepicker does not render [\#1](https://github.com/skratchdot/react-bootstrap-daterangepicker/issues/1)
552 |
553 | **Merged pull requests:**
554 |
555 | - Allow optionsFromProps to be passed at init [\#2](https://github.com/skratchdot/react-bootstrap-daterangepicker/pull/2) ([sbellity](https://github.com/sbellity))
556 |
557 | ## [0.0.6](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.0.6) (2014-09-04)
558 |
559 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.0.5...0.0.6)
560 |
561 | ## [0.0.5](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.0.5) (2014-08-04)
562 |
563 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.0.4...0.0.5)
564 |
565 | ## [0.0.4](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.0.4) (2014-07-24)
566 |
567 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.0.3...0.0.4)
568 |
569 | ## [0.0.3](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.0.3) (2014-07-24)
570 |
571 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.0.2...0.0.3)
572 |
573 | ## [0.0.2](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.0.2) (2014-07-23)
574 |
575 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/0.0.1...0.0.2)
576 |
577 | ## [0.0.1](https://github.com/skratchdot/react-bootstrap-daterangepicker/tree/0.0.1) (2014-07-23)
578 |
579 | [Full Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/compare/f744f719f966d21f01d68cae68976e2d543fa5ac...0.0.1)
580 |
581 | \* _This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_
582 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | ## License
2 |
3 | This code is made available under the same license as Bootstrap. Moment.js is included in this repository
4 | for convenience. It is available under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
5 |
6 | --
7 |
8 | Copyright 2012-2014 Dan Grossman
9 |
10 | Licensed under the Apache License, Version 2.0 (the "License");
11 | you may not use this file except in compliance with the License.
12 | You may obtain a copy of the License at
13 |
14 | http://www.apache.org/licenses/LICENSE-2.0
15 |
16 | Unless required by applicable law or agreed to in writing, software
17 | distributed under the License is distributed on an "AS IS" BASIS,
18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 | See the License for the specific language governing permissions and
20 | limitations under the License.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-bootstrap-daterangepicker
2 |
3 | [](http://badge.fury.io/js/react-bootstrap-daterangepicker)
4 | [](https://travis-ci.org/skratchdot/react-bootstrap-daterangepicker)
5 | [](https://codeclimate.com/github/skratchdot/react-bootstrap-daterangepicker)
6 | [](https://coveralls.io/github/skratchdot/react-bootstrap-daterangepicker?branch=master)
7 |
8 | [](https://npmjs.org/package/react-bootstrap-daterangepicker)
9 |
10 | # 🚨 Deprecation Notice 🚨
11 |
12 | > I put this project on github because I used it briefly for a project back in 2014. I haven't used it for years, and have recommended
13 | > looking for a "pure react" date picker library. I might continue to merge small PRs, but will not be giving this library much/any
14 | > support. I recommend using one of the [other react date picker](#other-react-date-pickers) libraries listed below.
15 |
16 | ## Description
17 |
18 | A date/time picker for react (using bootstrap). This is a react wrapper around
19 | an existing jQuery/bootstrap library (it is not a pure react port):
20 |
21 | [bootstrap-daterangepicker](https://github.com/dangrossman/bootstrap-daterangepicker)
22 |
23 | ## Getting Started
24 |
25 | 1. Install the needed peer dependencies:
26 | `npm install --save bootstrap-daterangepicker react jquery moment`
27 |
28 | 2. Install the module with:
29 | `npm install --save react-bootstrap-daterangepicker`
30 |
31 | 3. Include the bootstrap@4 css and fonts in your project.
32 | (aka `import 'bootstrap/dist/css/bootstrap.css';`)
33 |
34 | 4. Include the bootstrap-daterangepicker css in your project.
35 | (aka `import 'bootstrap-daterangepicker/daterangepicker.css';`)
36 |
37 | 5. This is a commonjs library. You will need a tool like browserify/webpack/etc to build your code.
38 |
39 | ```javascript
40 | import React, { Component } from 'react';
41 | import DateRangePicker from 'react-bootstrap-daterangepicker';
42 | // you will need the css that comes with bootstrap@3. if you are using
43 | // a tool like webpack, you can do the following:
44 | import 'bootstrap/dist/css/bootstrap.css';
45 | // you will also need the css that comes with bootstrap-daterangepicker
46 | import 'bootstrap-daterangepicker/daterangepicker.css';
47 |
48 | class MyComponent {
49 | render() {
50 | return (
51 |
54 |
55 |
56 | );
57 | }
58 | }
59 | ```
60 |
61 | ## Documentation
62 |
63 | For in depth documentation, see the original
64 | [bootstrap-daterangepicker](https://github.com/dangrossman/bootstrap-daterangepicker) project page.
65 |
66 | You can pass all the settings from the original plugin to the `initialSettings` prop:
67 |
68 | - **<input>, alwaysShowCalendars, applyButtonClasses, applyClass,
69 | autoApply, autoUpdateInput, buttonClasses, cancelButtonClasses, cancelClass,
70 | dateLimit, drops, endDate, isCustomDate, isInvalidDate, linkedCalendars,
71 | locale, maxDate, maxSpan, maxYear, minDate, minYear, moment, opens, parentEl,
72 | ranges, showCustomRangeLabel, showDropdowns, showISOWeekNumbers,
73 | showWeekNumbers, singleDatePicker, startDate, template, timePicker,
74 | timePicker24Hour, timePickerIncrement, timePickerSeconds**
75 |
76 | You can listen to the following 8 events:
77 |
78 | - **onShow**: `callback(event, picker)` thrown when the widget is shown
79 | - **onHide**: `callback(event, picker)` thrown when the widget is hidden
80 | - **onShowCalendar**: `callback(event, picker)` thrown when the calendar is shown
81 | - **onHideCalendar**: `callback(event, picker)` thrown when the calendar is hidden
82 | - **onApply**: `callback(event, picker)` thrown when the apply button is clicked
83 | - **onCancel**: `callback(event, picker)` thrown when the cancel button is clicked
84 | - **onEvent**: `callback(event, picker)` thrown when any of the 6 events above are triggered
85 | - **onCallback**: `callback(start, end, label)` thrown when the start/end dates change
86 |
87 | You MUST pass a single child element to the `` component- and it MUST be a DOM element.
88 | Passing custom react components is not currently supported b/c this lib needs a single dom node to initialize.
89 |
90 | NOTE: This component should be used as an [Uncontrolled Component](https://reactjs.org/docs/uncontrolled-components.html). If you try
91 | to control the value of your child ``, then you will probably encounter issues.
92 |
93 | There are 2 methods from the upstream lib that can be called: `setStartDate` and `setEndDate`, but you need to use refs when doing so.
94 | Please view the storybook for an example of this.
95 |
96 | ### Examples
97 |
98 | For more usage examples, please view the storybook:
99 | https://projects.skratchdot.com/react-bootstrap-daterangepicker/
100 |
101 | #### Simple button example
102 |
103 | ```javascript
104 |
105 |
108 |
109 | ```
110 |
111 | #### Simple input example
112 |
113 | ```javascript
114 |
115 |
116 |
117 | ```
118 |
119 | #### Initialize with a startDate and endDate
120 |
121 | ```javascript
122 |
125 |
126 |
127 | ```
128 |
129 | #### Example event handler:
130 |
131 | ```javascript
132 | class SomeReactComponent extends React.Component {
133 | handleEvent(event, picker) {
134 | console.log(picker.startDate);
135 | }
136 | handleCallback(start, end, label) {
137 | console.log(start, end, label);
138 | }
139 | render() {
140 | return (
141 |
142 |
143 | ;
144 | }
145 | }
146 | ```
147 |
148 | ## Release Notes
149 |
150 | Release notes can be found in the
151 | [Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/blob/master/CHANGELOG.md).
152 |
153 | ## Links
154 |
155 | - [Source Code](https://github.com/skratchdot/react-bootstrap-daterangepicker)
156 | - [Changelog](https://github.com/skratchdot/react-bootstrap-daterangepicker/blob/master/CHANGELOG.md)
157 | - [Live Demo](http://projects.skratchdot.com/react-bootstrap-daterangepicker/)
158 | - [Original Plugin](https://github.com/dangrossman/bootstrap-daterangepicker)
159 |
160 | ## Other React Date Pickers
161 |
162 | - [react-date-range](https://github.com/Adphorus/react-date-range)
163 | - [react-dates](https://github.com/airbnb/react-dates)
164 | - [react-datepicker](https://github.com/Hacker0x01/react-datepicker)
165 | - [react-datetimerange-picker](https://github.com/wojtekmaj/react-datetimerange-picker)
166 |
167 | **NOTE: Please submit a PR if there are other date pickers you can recommend**
168 |
169 | ## License
170 |
171 | Copyright (c) 2014 skratchdot
172 | Uses the original [bootstrap-daterangepicker](https://github.com/dangrossman/bootstrap-daterangepicker) license.
173 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['@babel/preset-env', '@babel/preset-react', '@babel/typescript'],
3 | };
4 |
--------------------------------------------------------------------------------
/dist/index.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 | import * as React from 'react';
5 | import 'bootstrap-daterangepicker';
6 | export interface EventHandler {
7 | (event: JQuery.Event, picker: daterangepicker): any;
8 | }
9 | export interface CallbackHandler {
10 | (start?: daterangepicker.DateOrString, end?: daterangepicker.DateOrString, label?: string): any;
11 | }
12 | export interface Props {
13 | initialSettings?: daterangepicker.Options;
14 | onApply?: EventHandler;
15 | onCancel?: EventHandler;
16 | onHide?: EventHandler;
17 | onHideCalendar?: EventHandler;
18 | onShow?: EventHandler;
19 | onShowCalendar?: EventHandler;
20 | onEvent?: EventHandler;
21 | onCallback?: CallbackHandler;
22 | }
23 | export declare class DateRangePicker extends React.Component> {
24 | ref: any;
25 | $picker: JQuery | null;
26 | constructor(props: Props);
27 | componentDidMount(): void;
28 | componentWillUnmount(): void;
29 | handleCallback(...args: any): void;
30 | makeEventHandler(eventType: string): (event: JQuery.Event, picker: daterangepicker) => void;
31 | setStartDate(dateOrString: daterangepicker.DateOrString): void;
32 | setEndDate(dateOrString: daterangepicker.DateOrString): void;
33 | render(): React.FunctionComponentElement<{
34 | ref: (el: any) => any;
35 | }>;
36 | }
37 | export default DateRangePicker;
38 | //# sourceMappingURL=index.d.ts.map
--------------------------------------------------------------------------------
/dist/index.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,2BAA2B,CAAC;AAEnC,MAAM,WAAW,YAAY;IAC3B,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,GAAG,GAAG,CAAC;CACrD;AACD,MAAM,WAAW,eAAe;IAC9B,CACE,KAAK,CAAC,EAAE,eAAe,CAAC,YAAY,EACpC,GAAG,CAAC,EAAE,eAAe,CAAC,YAAY,EAClC,KAAK,CAAC,EAAE,MAAM,GACb,GAAG,CAAC;CACR;AACD,MAAM,WAAW,KAAK;IACpB,eAAe,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC;IAG1C,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,cAAc,CAAC,EAAE,YAAY,CAAC;IAG9B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B;AAED,qBAAa,eAAgB,SAAQ,KAAK,CAAC,SAAS,CAClD,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAC/B;IACC,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;gBACX,KAAK,EAAE,KAAK;IAKxB,iBAAiB;IAkBjB,oBAAoB;IAGpB,cAAc,CAAC,GAAG,IAAI,EAAE,GAAG;IAK3B,gBAAgB,CAAC,SAAS,EAAE,MAAM,WAEjB,YAAY,UAAU,eAAe;IAStD,YAAY,CAAC,YAAY,EAAE,eAAe,CAAC,YAAY;IAGvD,UAAU,CAAC,YAAY,EAAE,eAAe,CAAC,YAAY;IAGrD,MAAM;kBAGQ,GAAG;;CAGlB;AAED,eAAe,eAAe,CAAC"}
--------------------------------------------------------------------------------
/dist/index.es.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import $ from 'jquery';
3 | import 'bootstrap-daterangepicker';
4 |
5 | /******************************************************************************
6 | Copyright (c) Microsoft Corporation.
7 |
8 | Permission to use, copy, modify, and/or distribute this software for any
9 | purpose with or without fee is hereby granted.
10 |
11 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 | PERFORMANCE OF THIS SOFTWARE.
18 | ***************************************************************************** */
19 | /* global Reflect, Promise */
20 |
21 | var extendStatics = function(d, b) {
22 | extendStatics = Object.setPrototypeOf ||
23 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24 | function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
25 | return extendStatics(d, b);
26 | };
27 |
28 | function __extends(d, b) {
29 | if (typeof b !== "function" && b !== null)
30 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
31 | extendStatics(d, b);
32 | function __() { this.constructor = d; }
33 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34 | }
35 |
36 | var DateRangePicker = /** @class */ (function (_super) {
37 | __extends(DateRangePicker, _super);
38 | function DateRangePicker(props) {
39 | var _this = _super.call(this, props) || this;
40 | _this.ref = null;
41 | _this.$picker = null;
42 | return _this;
43 | }
44 | DateRangePicker.prototype.componentDidMount = function () {
45 | var _this = this;
46 | // initialize daterangepicker
47 | this.$picker = $(this.ref);
48 | this.$picker.daterangepicker(this.props.initialSettings, this.handleCallback.bind(this));
49 | // attach event listeners
50 | ['Show', 'Hide', 'ShowCalendar', 'HideCalendar', 'Apply', 'Cancel'].forEach(function (event) {
51 | var _a;
52 | var lcase = event.charAt(0).toLowerCase() + event.slice(1);
53 | (_a = _this.$picker) === null || _a === void 0 ? void 0 : _a.on(lcase + '.daterangepicker', _this.makeEventHandler('on' + event));
54 | });
55 | };
56 | DateRangePicker.prototype.componentWillUnmount = function () {
57 | var _a, _b;
58 | (_b = (_a = this.$picker) === null || _a === void 0 ? void 0 : _a.data('daterangepicker')) === null || _b === void 0 ? void 0 : _b.remove();
59 | };
60 | DateRangePicker.prototype.handleCallback = function () {
61 | var _a;
62 | var args = [];
63 | for (var _i = 0; _i < arguments.length; _i++) {
64 | args[_i] = arguments[_i];
65 | }
66 | if (typeof this.props.onCallback === 'function') {
67 | (_a = this.props).onCallback.apply(_a, args);
68 | }
69 | };
70 | DateRangePicker.prototype.makeEventHandler = function (eventType) {
71 | var _this = this;
72 | var onEvent = this.props.onEvent;
73 | return function (event, picker) {
74 | if (typeof onEvent === 'function') {
75 | onEvent(event, picker);
76 | }
77 | if (typeof _this.props[eventType] === 'function') {
78 | _this.props[eventType](event, picker);
79 | }
80 | };
81 | };
82 | DateRangePicker.prototype.setStartDate = function (dateOrString) {
83 | var _a, _b;
84 | (_b = (_a = this.$picker) === null || _a === void 0 ? void 0 : _a.data('daterangepicker')) === null || _b === void 0 ? void 0 : _b.setStartDate(dateOrString);
85 | };
86 | DateRangePicker.prototype.setEndDate = function (dateOrString) {
87 | var _a, _b;
88 | (_b = (_a = this.$picker) === null || _a === void 0 ? void 0 : _a.data('daterangepicker')) === null || _b === void 0 ? void 0 : _b.setEndDate(dateOrString);
89 | };
90 | DateRangePicker.prototype.render = function () {
91 | var _this = this;
92 | var childElement = React.Children.only(this.props.children);
93 | return React.cloneElement(childElement, {
94 | ref: function (el) { return (_this.ref = el); }
95 | });
96 | };
97 | return DateRangePicker;
98 | }(React.Component));
99 |
100 | export { DateRangePicker, DateRangePicker as default };
101 | //# sourceMappingURL=index.es.js.map
102 |
--------------------------------------------------------------------------------
/dist/index.es.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.es.js","sources":["../src/index.tsx"],"sourcesContent":["import * as React from 'react';\nimport $ from 'jquery';\nimport 'bootstrap-daterangepicker';\n\nexport interface EventHandler {\n (event: JQuery.Event, picker: daterangepicker): any;\n}\nexport interface CallbackHandler {\n (\n start?: daterangepicker.DateOrString,\n end?: daterangepicker.DateOrString,\n label?: string\n ): any;\n}\nexport interface Props {\n initialSettings?: daterangepicker.Options;\n\n // events supported by the upstream lib\n onApply?: EventHandler;\n onCancel?: EventHandler;\n onHide?: EventHandler;\n onHideCalendar?: EventHandler;\n onShow?: EventHandler;\n onShowCalendar?: EventHandler;\n\n // custom events in this lib\n onEvent?: EventHandler;\n onCallback?: CallbackHandler;\n}\n\nexport class DateRangePicker extends React.Component<\n React.PropsWithChildren\n> {\n ref: any;\n $picker: JQuery | null;\n constructor(props: Props) {\n super(props);\n this.ref = null;\n this.$picker = null;\n }\n componentDidMount() {\n // initialize daterangepicker\n this.$picker = $(this.ref);\n this.$picker.daterangepicker(\n this.props.initialSettings,\n this.handleCallback.bind(this)\n );\n // attach event listeners\n ['Show', 'Hide', 'ShowCalendar', 'HideCalendar', 'Apply', 'Cancel'].forEach(\n (event) => {\n const lcase = event.charAt(0).toLowerCase() + event.slice(1);\n this.$picker?.on(\n lcase + '.daterangepicker',\n this.makeEventHandler('on' + event)\n );\n }\n );\n }\n componentWillUnmount() {\n this.$picker?.data('daterangepicker')?.remove();\n }\n handleCallback(...args: any) {\n if (typeof this.props.onCallback === 'function') {\n this.props.onCallback(...args);\n }\n }\n makeEventHandler(eventType: string) {\n const { onEvent } = this.props;\n return (event: JQuery.Event, picker: daterangepicker) => {\n if (typeof onEvent === 'function') {\n onEvent(event, picker);\n }\n if (typeof (this.props as any)[eventType] === 'function') {\n (this.props as any)[eventType](event, picker);\n }\n };\n }\n setStartDate(dateOrString: daterangepicker.DateOrString) {\n this.$picker?.data('daterangepicker')?.setStartDate(dateOrString);\n }\n setEndDate(dateOrString: daterangepicker.DateOrString) {\n this.$picker?.data('daterangepicker')?.setEndDate(dateOrString);\n }\n render() {\n const childElement: any = React.Children.only(this.props.children);\n return React.cloneElement(childElement, {\n ref: (el: any) => (this.ref = el),\n });\n }\n}\n\nexport default DateRangePicker;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAA,eAAA,kBAAA,UAAA,MAAA,EAAA;IAAqC,SAEpC,CAAA,eAAA,EAAA,MAAA,CAAA,CAAA;AAGC,IAAA,SAAA,eAAA,CAAY,KAAY,EAAA;QAAxB,IACE,KAAA,GAAA,MAAA,CAAA,IAAA,CAAA,IAAA,EAAM,KAAK,CAAC,IAGb,IAAA,CAAA;AAFC,QAAA,KAAI,CAAC,GAAG,GAAG,IAAI,CAAC;AAChB,QAAA,KAAI,CAAC,OAAO,GAAG,IAAI,CAAC;;KACrB;AACD,IAAA,eAAA,CAAA,SAAA,CAAA,iBAAiB,GAAjB,YAAA;QAAA,IAiBC,KAAA,GAAA,IAAA,CAAA;;QAfC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,eAAe,CAC1B,IAAI,CAAC,KAAK,CAAC,eAAe,EAC1B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC/B,CAAC;;AAEF,QAAA,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,OAAO,CACzE,UAAC,KAAK,EAAA;;AACJ,YAAA,IAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7D,YAAA,CAAA,EAAA,GAAA,KAAI,CAAC,OAAO,0CAAE,EAAE,CACd,KAAK,GAAG,kBAAkB,EAC1B,KAAI,CAAC,gBAAgB,CAAC,IAAI,GAAG,KAAK,CAAC,CACpC,CAAC;AACJ,SAAC,CACF,CAAC;KACH,CAAA;AACD,IAAA,eAAA,CAAA,SAAA,CAAA,oBAAoB,GAApB,YAAA;;AACE,QAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAI,CAAC,iBAAiB,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,MAAM,EAAE,CAAC;KACjD,CAAA;AACD,IAAA,eAAA,CAAA,SAAA,CAAA,cAAc,GAAd,YAAA;;QAAe,IAAY,IAAA,GAAA,EAAA,CAAA;aAAZ,IAAY,EAAA,GAAA,CAAA,EAAZ,EAAY,GAAA,SAAA,CAAA,MAAA,EAAZ,EAAY,EAAA,EAAA;YAAZ,IAAY,CAAA,EAAA,CAAA,GAAA,SAAA,CAAA,EAAA,CAAA,CAAA;;QACzB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,UAAU,EAAE;YAC/C,CAAA,EAAA,GAAA,IAAI,CAAC,KAAK,EAAC,UAAU,CAAI,KAAA,CAAA,EAAA,EAAA,IAAI,CAAE,CAAA;AAChC,SAAA;KACF,CAAA;IACD,eAAgB,CAAA,SAAA,CAAA,gBAAA,GAAhB,UAAiB,SAAiB,EAAA;QAAlC,IAUC,KAAA,GAAA,IAAA,CAAA;AATS,QAAA,IAAA,OAAO,GAAK,IAAI,CAAC,KAAK,QAAf,CAAgB;QAC/B,OAAO,UAAC,KAAmB,EAAE,MAAuB,EAAA;AAClD,YAAA,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;AACjC,gBAAA,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACxB,aAAA;YACD,IAAI,OAAQ,KAAI,CAAC,KAAa,CAAC,SAAS,CAAC,KAAK,UAAU,EAAE;gBACvD,KAAI,CAAC,KAAa,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC/C,aAAA;AACH,SAAC,CAAC;KACH,CAAA;IACD,eAAY,CAAA,SAAA,CAAA,YAAA,GAAZ,UAAa,YAA0C,EAAA;;AACrD,QAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,iBAAiB,CAAC,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAY,CAAC,YAAY,CAAC,CAAC;KACnE,CAAA;IACD,eAAU,CAAA,SAAA,CAAA,UAAA,GAAV,UAAW,YAA0C,EAAA;;AACnD,QAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,iBAAiB,CAAC,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,UAAU,CAAC,YAAY,CAAC,CAAC;KACjE,CAAA;AACD,IAAA,eAAA,CAAA,SAAA,CAAA,MAAM,GAAN,YAAA;QAAA,IAKC,KAAA,GAAA,IAAA,CAAA;AAJC,QAAA,IAAM,YAAY,GAAQ,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACnE,QAAA,OAAO,KAAK,CAAC,YAAY,CAAC,YAAY,EAAE;AACtC,YAAA,GAAG,EAAE,UAAC,EAAO,EAAA,EAAK,QAAC,KAAI,CAAC,GAAG,GAAG,EAAE,IAAC;AAClC,SAAA,CAAC,CAAC;KACJ,CAAA;IACH,OAAC,eAAA,CAAA;AAAD,CAAC,CA3DoC,KAAK,CAAC,SAAS,CA2DnD;;;;"}
--------------------------------------------------------------------------------
/dist/index.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | Object.defineProperty(exports, '__esModule', { value: true });
4 |
5 | var React = require('react');
6 | var $ = require('jquery');
7 | require('bootstrap-daterangepicker');
8 |
9 | function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10 |
11 | function _interopNamespace(e) {
12 | if (e && e.__esModule) return e;
13 | var n = Object.create(null);
14 | if (e) {
15 | Object.keys(e).forEach(function (k) {
16 | if (k !== 'default') {
17 | var d = Object.getOwnPropertyDescriptor(e, k);
18 | Object.defineProperty(n, k, d.get ? d : {
19 | enumerable: true,
20 | get: function () { return e[k]; }
21 | });
22 | }
23 | });
24 | }
25 | n["default"] = e;
26 | return Object.freeze(n);
27 | }
28 |
29 | var React__namespace = /*#__PURE__*/_interopNamespace(React);
30 | var $__default = /*#__PURE__*/_interopDefaultLegacy($);
31 |
32 | /******************************************************************************
33 | Copyright (c) Microsoft Corporation.
34 |
35 | Permission to use, copy, modify, and/or distribute this software for any
36 | purpose with or without fee is hereby granted.
37 |
38 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
39 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
40 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
41 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
42 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44 | PERFORMANCE OF THIS SOFTWARE.
45 | ***************************************************************************** */
46 | /* global Reflect, Promise */
47 |
48 | var extendStatics = function(d, b) {
49 | extendStatics = Object.setPrototypeOf ||
50 | ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
51 | function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
52 | return extendStatics(d, b);
53 | };
54 |
55 | function __extends(d, b) {
56 | if (typeof b !== "function" && b !== null)
57 | throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
58 | extendStatics(d, b);
59 | function __() { this.constructor = d; }
60 | d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
61 | }
62 |
63 | var DateRangePicker = /** @class */ (function (_super) {
64 | __extends(DateRangePicker, _super);
65 | function DateRangePicker(props) {
66 | var _this = _super.call(this, props) || this;
67 | _this.ref = null;
68 | _this.$picker = null;
69 | return _this;
70 | }
71 | DateRangePicker.prototype.componentDidMount = function () {
72 | var _this = this;
73 | // initialize daterangepicker
74 | this.$picker = $__default["default"](this.ref);
75 | this.$picker.daterangepicker(this.props.initialSettings, this.handleCallback.bind(this));
76 | // attach event listeners
77 | ['Show', 'Hide', 'ShowCalendar', 'HideCalendar', 'Apply', 'Cancel'].forEach(function (event) {
78 | var _a;
79 | var lcase = event.charAt(0).toLowerCase() + event.slice(1);
80 | (_a = _this.$picker) === null || _a === void 0 ? void 0 : _a.on(lcase + '.daterangepicker', _this.makeEventHandler('on' + event));
81 | });
82 | };
83 | DateRangePicker.prototype.componentWillUnmount = function () {
84 | var _a, _b;
85 | (_b = (_a = this.$picker) === null || _a === void 0 ? void 0 : _a.data('daterangepicker')) === null || _b === void 0 ? void 0 : _b.remove();
86 | };
87 | DateRangePicker.prototype.handleCallback = function () {
88 | var _a;
89 | var args = [];
90 | for (var _i = 0; _i < arguments.length; _i++) {
91 | args[_i] = arguments[_i];
92 | }
93 | if (typeof this.props.onCallback === 'function') {
94 | (_a = this.props).onCallback.apply(_a, args);
95 | }
96 | };
97 | DateRangePicker.prototype.makeEventHandler = function (eventType) {
98 | var _this = this;
99 | var onEvent = this.props.onEvent;
100 | return function (event, picker) {
101 | if (typeof onEvent === 'function') {
102 | onEvent(event, picker);
103 | }
104 | if (typeof _this.props[eventType] === 'function') {
105 | _this.props[eventType](event, picker);
106 | }
107 | };
108 | };
109 | DateRangePicker.prototype.setStartDate = function (dateOrString) {
110 | var _a, _b;
111 | (_b = (_a = this.$picker) === null || _a === void 0 ? void 0 : _a.data('daterangepicker')) === null || _b === void 0 ? void 0 : _b.setStartDate(dateOrString);
112 | };
113 | DateRangePicker.prototype.setEndDate = function (dateOrString) {
114 | var _a, _b;
115 | (_b = (_a = this.$picker) === null || _a === void 0 ? void 0 : _a.data('daterangepicker')) === null || _b === void 0 ? void 0 : _b.setEndDate(dateOrString);
116 | };
117 | DateRangePicker.prototype.render = function () {
118 | var _this = this;
119 | var childElement = React__namespace.Children.only(this.props.children);
120 | return React__namespace.cloneElement(childElement, {
121 | ref: function (el) { return (_this.ref = el); }
122 | });
123 | };
124 | return DateRangePicker;
125 | }(React__namespace.Component));
126 |
127 | exports.DateRangePicker = DateRangePicker;
128 | exports["default"] = DateRangePicker;
129 | //# sourceMappingURL=index.js.map
130 |
--------------------------------------------------------------------------------
/dist/index.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.js","sources":["../src/index.tsx"],"sourcesContent":["import * as React from 'react';\nimport $ from 'jquery';\nimport 'bootstrap-daterangepicker';\n\nexport interface EventHandler {\n (event: JQuery.Event, picker: daterangepicker): any;\n}\nexport interface CallbackHandler {\n (\n start?: daterangepicker.DateOrString,\n end?: daterangepicker.DateOrString,\n label?: string\n ): any;\n}\nexport interface Props {\n initialSettings?: daterangepicker.Options;\n\n // events supported by the upstream lib\n onApply?: EventHandler;\n onCancel?: EventHandler;\n onHide?: EventHandler;\n onHideCalendar?: EventHandler;\n onShow?: EventHandler;\n onShowCalendar?: EventHandler;\n\n // custom events in this lib\n onEvent?: EventHandler;\n onCallback?: CallbackHandler;\n}\n\nexport class DateRangePicker extends React.Component<\n React.PropsWithChildren\n> {\n ref: any;\n $picker: JQuery | null;\n constructor(props: Props) {\n super(props);\n this.ref = null;\n this.$picker = null;\n }\n componentDidMount() {\n // initialize daterangepicker\n this.$picker = $(this.ref);\n this.$picker.daterangepicker(\n this.props.initialSettings,\n this.handleCallback.bind(this)\n );\n // attach event listeners\n ['Show', 'Hide', 'ShowCalendar', 'HideCalendar', 'Apply', 'Cancel'].forEach(\n (event) => {\n const lcase = event.charAt(0).toLowerCase() + event.slice(1);\n this.$picker?.on(\n lcase + '.daterangepicker',\n this.makeEventHandler('on' + event)\n );\n }\n );\n }\n componentWillUnmount() {\n this.$picker?.data('daterangepicker')?.remove();\n }\n handleCallback(...args: any) {\n if (typeof this.props.onCallback === 'function') {\n this.props.onCallback(...args);\n }\n }\n makeEventHandler(eventType: string) {\n const { onEvent } = this.props;\n return (event: JQuery.Event, picker: daterangepicker) => {\n if (typeof onEvent === 'function') {\n onEvent(event, picker);\n }\n if (typeof (this.props as any)[eventType] === 'function') {\n (this.props as any)[eventType](event, picker);\n }\n };\n }\n setStartDate(dateOrString: daterangepicker.DateOrString) {\n this.$picker?.data('daterangepicker')?.setStartDate(dateOrString);\n }\n setEndDate(dateOrString: daterangepicker.DateOrString) {\n this.$picker?.data('daterangepicker')?.setEndDate(dateOrString);\n }\n render() {\n const childElement: any = React.Children.only(this.props.children);\n return React.cloneElement(childElement, {\n ref: (el: any) => (this.ref = el),\n });\n }\n}\n\nexport default DateRangePicker;\n"],"names":["$","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,IAAA,eAAA,kBAAA,UAAA,MAAA,EAAA;IAAqC,SAEpC,CAAA,eAAA,EAAA,MAAA,CAAA,CAAA;AAGC,IAAA,SAAA,eAAA,CAAY,KAAY,EAAA;QAAxB,IACE,KAAA,GAAA,MAAA,CAAA,IAAA,CAAA,IAAA,EAAM,KAAK,CAAC,IAGb,IAAA,CAAA;AAFC,QAAA,KAAI,CAAC,GAAG,GAAG,IAAI,CAAC;AAChB,QAAA,KAAI,CAAC,OAAO,GAAG,IAAI,CAAC;;KACrB;AACD,IAAA,eAAA,CAAA,SAAA,CAAA,iBAAiB,GAAjB,YAAA;QAAA,IAiBC,KAAA,GAAA,IAAA,CAAA;;QAfC,IAAI,CAAC,OAAO,GAAGA,qBAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,eAAe,CAC1B,IAAI,CAAC,KAAK,CAAC,eAAe,EAC1B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAC/B,CAAC;;AAEF,QAAA,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,OAAO,CACzE,UAAC,KAAK,EAAA;;AACJ,YAAA,IAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7D,YAAA,CAAA,EAAA,GAAA,KAAI,CAAC,OAAO,0CAAE,EAAE,CACd,KAAK,GAAG,kBAAkB,EAC1B,KAAI,CAAC,gBAAgB,CAAC,IAAI,GAAG,KAAK,CAAC,CACpC,CAAC;AACJ,SAAC,CACF,CAAC;KACH,CAAA;AACD,IAAA,eAAA,CAAA,SAAA,CAAA,oBAAoB,GAApB,YAAA;;AACE,QAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,IAAI,CAAC,iBAAiB,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAE,MAAM,EAAE,CAAC;KACjD,CAAA;AACD,IAAA,eAAA,CAAA,SAAA,CAAA,cAAc,GAAd,YAAA;;QAAe,IAAY,IAAA,GAAA,EAAA,CAAA;aAAZ,IAAY,EAAA,GAAA,CAAA,EAAZ,EAAY,GAAA,SAAA,CAAA,MAAA,EAAZ,EAAY,EAAA,EAAA;YAAZ,IAAY,CAAA,EAAA,CAAA,GAAA,SAAA,CAAA,EAAA,CAAA,CAAA;;QACzB,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,KAAK,UAAU,EAAE;YAC/C,CAAA,EAAA,GAAA,IAAI,CAAC,KAAK,EAAC,UAAU,CAAI,KAAA,CAAA,EAAA,EAAA,IAAI,CAAE,CAAA;AAChC,SAAA;KACF,CAAA;IACD,eAAgB,CAAA,SAAA,CAAA,gBAAA,GAAhB,UAAiB,SAAiB,EAAA;QAAlC,IAUC,KAAA,GAAA,IAAA,CAAA;AATS,QAAA,IAAA,OAAO,GAAK,IAAI,CAAC,KAAK,QAAf,CAAgB;QAC/B,OAAO,UAAC,KAAmB,EAAE,MAAuB,EAAA;AAClD,YAAA,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;AACjC,gBAAA,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AACxB,aAAA;YACD,IAAI,OAAQ,KAAI,CAAC,KAAa,CAAC,SAAS,CAAC,KAAK,UAAU,EAAE;gBACvD,KAAI,CAAC,KAAa,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;AAC/C,aAAA;AACH,SAAC,CAAC;KACH,CAAA;IACD,eAAY,CAAA,SAAA,CAAA,YAAA,GAAZ,UAAa,YAA0C,EAAA;;AACrD,QAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,iBAAiB,CAAC,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,YAAY,CAAC,YAAY,CAAC,CAAC;KACnE,CAAA;IACD,eAAU,CAAA,SAAA,CAAA,UAAA,GAAV,UAAW,YAA0C,EAAA;;AACnD,QAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,iBAAiB,CAAC,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,UAAU,CAAC,YAAY,CAAC,CAAC;KACjE,CAAA;AACD,IAAA,eAAA,CAAA,SAAA,CAAA,MAAM,GAAN,YAAA;QAAA,IAKC,KAAA,GAAA,IAAA,CAAA;AAJC,QAAA,IAAM,YAAY,GAAQC,gBAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACnE,QAAA,OAAOA,gBAAK,CAAC,YAAY,CAAC,YAAY,EAAE;AACtC,YAAA,GAAG,EAAE,UAAC,EAAO,EAAA,EAAK,QAAC,KAAI,CAAC,GAAG,GAAG,EAAE,IAAC;AAClC,SAAA,CAAC,CAAC;KACJ,CAAA;IACH,OAAC,eAAA,CAAA;AAAD,CAAC,CA3DoCA,gBAAK,CAAC,SAAS,CA2DnD;;;;;"}
--------------------------------------------------------------------------------
/docs/28.eaf1594843a37e65492e.manager.bundle.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*
2 | object-assign
3 | (c) Sindre Sorhus
4 | @license MIT
5 | */
6 |
7 | /*!
8 | * Fuse.js v3.6.1 - Lightweight fuzzy-search (http://fusejs.io)
9 | *
10 | * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
11 | * All Rights Reserved. Apache Software License 2.0
12 | *
13 | * http://www.apache.org/licenses/LICENSE-2.0
14 | */
15 |
16 | /*!
17 | * https://github.com/es-shims/es5-shim
18 | * @license es5-shim Copyright 2009-2020 by contributors, MIT License
19 | * see https://github.com/es-shims/es5-shim/blob/master/LICENSE
20 | */
21 |
22 | /*!
23 | * isobject
24 | *
25 | * Copyright (c) 2014-2017, Jon Schlinkert.
26 | * Released under the MIT License.
27 | */
28 |
29 | /*! *****************************************************************************
30 | Copyright (c) Microsoft Corporation.
31 |
32 | Permission to use, copy, modify, and/or distribute this software for any
33 | purpose with or without fee is hereby granted.
34 |
35 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
36 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
37 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
38 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
39 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
40 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
41 | PERFORMANCE OF THIS SOFTWARE.
42 | ***************************************************************************** */
43 |
44 | /*! store2 - v2.13.1 - 2021-12-20
45 | * Copyright (c) 2021 Nathan Bubna; Licensed (MIT OR GPL-3.0) */
46 |
47 | /**
48 | * @license React
49 | * react-dom.production.min.js
50 | *
51 | * Copyright (c) Facebook, Inc. and its affiliates.
52 | *
53 | * This source code is licensed under the MIT license found in the
54 | * LICENSE file in the root directory of this source tree.
55 | */
56 |
57 | /**
58 | * @license React
59 | * react.production.min.js
60 | *
61 | * Copyright (c) Facebook, Inc. and its affiliates.
62 | *
63 | * This source code is licensed under the MIT license found in the
64 | * LICENSE file in the root directory of this source tree.
65 | */
66 |
67 | /**
68 | * @license React
69 | * scheduler.production.min.js
70 | *
71 | * Copyright (c) Facebook, Inc. and its affiliates.
72 | *
73 | * This source code is licensed under the MIT license found in the
74 | * LICENSE file in the root directory of this source tree.
75 | */
76 |
77 | /**
78 | * React Router DOM v6.0.2
79 | *
80 | * Copyright (c) Remix Software Inc.
81 | *
82 | * This source code is licensed under the MIT license found in the
83 | * LICENSE.md file in the root directory of this source tree.
84 | *
85 | * @license MIT
86 | */
87 |
88 | /**
89 | * React Router v6.0.2
90 | *
91 | * Copyright (c) Remix Software Inc.
92 | *
93 | * This source code is licensed under the MIT license found in the
94 | * LICENSE.md file in the root directory of this source tree.
95 | *
96 | * @license MIT
97 | */
98 |
--------------------------------------------------------------------------------
/docs/295.87668df083831d3d6399.manager.bundle.js:
--------------------------------------------------------------------------------
1 | (self.webpackChunkreact_bootstrap_daterangepicker=self.webpackChunkreact_bootstrap_daterangepicker||[]).push([[295],{19295:module=>{module.exports=function(e,n){return n=n||{},new Promise((function(t,r){var s=new XMLHttpRequest,o=[],u=[],i={},a=function(){return{ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(e){return i[e.toLowerCase()]},has:function(e){return e.toLowerCase()in i}}}};for(var l in s.open(n.method||"get",e,!0),s.onload=function(){s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,n,t){o.push(n=n.toLowerCase()),u.push([n,t]),i[n]=i[n]?i[n]+","+t:t})),t(a())},s.onerror=r,s.withCredentials="include"==n.credentials,n.headers)s.setRequestHeader(l,n.headers[l]);s.send(n.body||null)}))}}}]);
--------------------------------------------------------------------------------
/docs/38.cf190100.iframe.bundle.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*!
2 | * Sizzle CSS Selector Engine v2.3.6
3 | * https://sizzlejs.com/
4 | *
5 | * Copyright JS Foundation and other contributors
6 | * Released under the MIT license
7 | * https://js.foundation/
8 | *
9 | * Date: 2021-02-16
10 | */
11 |
12 | /*!
13 | * escape-html
14 | * Copyright(c) 2012-2013 TJ Holowaychuk
15 | * Copyright(c) 2015 Andreas Lubbe
16 | * Copyright(c) 2015 Tiancheng "Timothy" Gu
17 | * MIT Licensed
18 | */
19 |
20 | /*!
21 | * https://github.com/es-shims/es5-shim
22 | * @license es5-shim Copyright 2009-2020 by contributors, MIT License
23 | * see https://github.com/es-shims/es5-shim/blob/master/LICENSE
24 | */
25 |
26 | /*!
27 | * isobject
28 | *
29 | * Copyright (c) 2014-2017, Jon Schlinkert.
30 | * Released under the MIT License.
31 | */
32 |
33 | /*!
34 | * jQuery JavaScript Library v3.6.0
35 | * https://jquery.com/
36 | *
37 | * Includes Sizzle.js
38 | * https://sizzlejs.com/
39 | *
40 | * Copyright OpenJS Foundation and other contributors
41 | * Released under the MIT license
42 | * https://jquery.org/license
43 | *
44 | * Date: 2021-03-02T17:08Z
45 | */
46 |
47 | /**
48 | * @license React
49 | * react-dom.production.min.js
50 | *
51 | * Copyright (c) Facebook, Inc. and its affiliates.
52 | *
53 | * This source code is licensed under the MIT license found in the
54 | * LICENSE file in the root directory of this source tree.
55 | */
56 |
57 | /**
58 | * @license React
59 | * react-jsx-runtime.production.min.js
60 | *
61 | * Copyright (c) Facebook, Inc. and its affiliates.
62 | *
63 | * This source code is licensed under the MIT license found in the
64 | * LICENSE file in the root directory of this source tree.
65 | */
66 |
67 | /**
68 | * @license React
69 | * react.production.min.js
70 | *
71 | * Copyright (c) Facebook, Inc. and its affiliates.
72 | *
73 | * This source code is licensed under the MIT license found in the
74 | * LICENSE file in the root directory of this source tree.
75 | */
76 |
77 | /**
78 | * @license React
79 | * scheduler.production.min.js
80 | *
81 | * Copyright (c) Facebook, Inc. and its affiliates.
82 | *
83 | * This source code is licensed under the MIT license found in the
84 | * LICENSE file in the root directory of this source tree.
85 | */
86 |
87 | /**
88 | * @version: 3.1
89 | * @author: Dan Grossman http://www.dangrossman.info/
90 | * @copyright: Copyright (c) 2012-2019 Dan Grossman. All rights reserved.
91 | * @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
92 | * @website: http://www.daterangepicker.com/
93 | */
94 |
95 | //! moment.js
96 |
97 | //! moment.js locale configuration
98 |
99 | //! stable.js 0.1.8, https://github.com/Two-Screen/stable
100 |
101 | //! © 2018 Angry Bytes and contributors. MIT licensed.
102 |
--------------------------------------------------------------------------------
/docs/51.94ab232695a89240eba0.manager.bundle.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /**
2 | * Prism: Lightweight, robust, elegant syntax highlighting
3 | *
4 | * @license MIT
5 | * @author Lea Verou
6 | * @namespace
7 | * @public
8 | */
9 |
--------------------------------------------------------------------------------
/docs/551.5b80c598a88ead76a32a.manager.bundle.js:
--------------------------------------------------------------------------------
1 | "use strict";(self.webpackChunkreact_bootstrap_daterangepicker=self.webpackChunkreact_bootstrap_daterangepicker||[]).push([[551],{82551:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>GlobalScrollAreaStyles,getScrollAreaStyles:()=>getScrollAreaStyles});__webpack_require__(47042),__webpack_require__(43371);var _templateObject,react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(67294),_storybook_theming__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(65316);var hsResizeObserverDummyAnimation=(0,_storybook_theming__WEBPACK_IMPORTED_MODULE_3__.keyframes)(_templateObject||(_templateObject=function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}(["0%{z-index:0}to{z-index:-1}"]))),getScrollAreaStyles=function getScrollAreaStyles(theme){return{"html.os-html, html.os-html>.os-host":{display:"block",overflow:"hidden",boxSizing:"border-box",height:"100%!important",width:"100%!important",minWidth:"100%!important",minHeight:"100%!important",margin:"0!important",position:"absolute!important"},"html.os-html>.os-host>.os-padding":{position:"absolute"},"body.os-dragging, body.os-dragging *":{cursor:"default"},".os-host, .os-host-textarea":{position:"relative",overflow:"visible!important",flexDirection:"column",flexWrap:"nowrap",justifyContent:"flex-start",alignContent:"flex-start",alignItems:"flex-start"},".os-host-flexbox":{overflow:"hidden!important",display:"flex"},".os-host-flexbox>.os-size-auto-observer":{height:"inherit!important"},".os-host-flexbox>.os-content-glue":{flexGrow:1,flexShrink:0},".os-host-flexbox>.os-size-auto-observer, .os-host-flexbox>.os-content-glue":{minHeight:0,minWidth:0,flexGrow:0,flexShrink:1,flexBasis:"auto"},"#os-dummy-scrollbar-size":{position:"fixed",opacity:0,visibility:"hidden",overflow:"scroll",height:500,width:500},"#os-dummy-scrollbar-size>div":{width:"200%",height:"200%",margin:10},"#os-dummy-scrollbar-size, .os-viewport":{},".os-viewport-native-scrollbars-invisible#os-dummy-scrollbar-size, .os-viewport-native-scrollbars-invisible.os-viewport":{scrollbarWidth:"none!important"},".os-viewport-native-scrollbars-invisible#os-dummy-scrollbar-size::-webkit-scrollbar, .os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar, .os-viewport-native-scrollbars-invisible#os-dummy-scrollbar-size::-webkit-scrollbar-corner, .os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar-corner":{display:"none!important",width:"0!important",height:"0!important",visibility:"hidden!important",background:"0 0!important"},".os-content-glue":{boxSizing:"inherit",maxHeight:"100%",maxWidth:"100%",width:"100%",pointerEvents:"none"},".os-padding":{boxSizing:"inherit",direction:"inherit",position:"absolute",overflow:"visible",padding:0,margin:0,left:0,top:0,bottom:0,right:0,width:"auto!important",height:"auto!important",zIndex:1},".os-host-overflow>.os-padding":{overflow:"hidden"},".os-viewport":{direction:"inherit!important",boxSizing:"inherit!important",resize:"none!important",outline:"0!important",position:"absolute",overflow:"hidden",top:0,left:0,bottom:0,right:0,padding:0,margin:0},".os-content-arrange":{position:"absolute",zIndex:-1,minHeight:1,minWidth:1,pointerEvents:"none"},".os-content":{direction:"inherit",boxSizing:"border-box!important",position:"relative",display:"block",height:"100%",width:"100%",visibility:"visible"},".os-content:before, .os-content:after":{content:"''",display:"table",width:0,height:0,lineHeight:0,fontSize:0},".os-content>.os-textarea":{boxSizing:"border-box!important",direction:"inherit!important",background:"0 0!important",outline:"0 transparent!important",overflow:"hidden!important",position:"absolute!important",display:"block!important",top:"0!important",left:"0!important",margin:"0!important",borderRadius:"0!important",float:"none!important",filter:"none!important",border:"0!important",resize:"none!important",transform:"none!important",maxWidth:"none!important",maxHeight:"none!important",boxShadow:"none!important",perspective:"none!important",opacity:"1!important",zIndex:"1!important",clip:"auto!important",verticalAlign:"baseline!important",padding:0},".os-host-rtl>.os-padding>.os-viewport>.os-content>.os-textarea":{right:"0!important"},".os-content>.os-textarea-cover":{zIndex:-1,pointerEvents:"none"},".os-content>.os-textarea[wrap=off]":{whiteSpace:"pre!important",margin:"0!important"},".os-text-inherit":{fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",fontStyle:"inherit",fontVariant:"inherit",textTransform:"inherit",textDecoration:"inherit",textIndent:"inherit",textAlign:"inherit",textShadow:"inherit",textOverflow:"inherit",letterSpacing:"inherit",wordSpacing:"inherit",lineHeight:"inherit",unicodeBidi:"inherit",direction:"inherit",color:"inherit",cursor:"text"},".os-resize-observer, .os-resize-observer-host":{boxSizing:"inherit",display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},".os-resize-observer-host":{padding:"inherit",border:"inherit",borderColor:"transparent",borderStyle:"solid",boxSizing:"border-box"},".os-resize-observer-host:after":{content:"''"},".os-resize-observer-host>.os-resize-observer, .os-resize-observer-host:after":{height:"200%",width:"200%",padding:"inherit",border:"inherit",margin:0,display:"block",boxSizing:"content-box"},".os-resize-observer.observed, object.os-resize-observer":{boxSizing:"border-box!important"},".os-size-auto-observer":{boxSizing:"inherit!important",height:"100%",width:"inherit",maxWidth:1,position:"relative",float:"left",maxHeight:1,overflow:"hidden",zIndex:-1,padding:0,margin:0,pointerEvents:"none",flexGrow:"inherit",flexShrink:0,flexBasis:0},".os-size-auto-observer>.os-resize-observer":{width:"1000%",height:"1000%",minHeight:1,minWidth:1},".os-resize-observer-item":{position:"absolute",top:0,right:0,bottom:0,left:0,overflow:"hidden",zIndex:-1,opacity:0,direction:"ltr!important",flex:"none!important"},".os-resize-observer-item-final":{position:"absolute",left:0,top:0,transition:"none!important",flex:"none!important"},".os-resize-observer":{animationDuration:".001s",animationName:"".concat(hsResizeObserverDummyAnimation)},".os-host-transition>.os-scrollbar, .os-host-transition>.os-scrollbar-corner":{transition:"opacity .3s,visibility .3s,top .3s,right .3s,bottom .3s,left .3s"},"html.os-html>.os-host>.os-scrollbar":{position:"absolute",zIndex:999999},".os-scrollbar, .os-scrollbar-corner":{position:"absolute",opacity:1,zIndex:1},".os-scrollbar-corner":{bottom:0,right:0,height:10,width:10,backgroundColor:"transparent"},".os-scrollbar":{pointerEvents:"none",padding:2,boxSizing:"border-box",background:0},".os-scrollbar-track":{pointerEvents:"auto",position:"relative",height:"100%",width:"100%",padding:"0!important",border:"0!important"},".os-scrollbar-handle":{pointerEvents:"auto",position:"absolute",width:"100%",height:"100%"},".os-scrollbar-handle-off, .os-scrollbar-track-off":{pointerEvents:"none"},".os-scrollbar.os-scrollbar-unusable, .os-scrollbar.os-scrollbar-unusable *":{pointerEvents:"none!important"},".os-scrollbar.os-scrollbar-unusable .os-scrollbar-handle":{opacity:"0!important"},".os-scrollbar-horizontal":{bottom:0,left:0,right:10,height:10},".os-scrollbar-vertical":{top:0,right:0,bottom:10,width:10},".os-host-rtl>.os-scrollbar-horizontal":{right:0},".os-host-rtl>.os-scrollbar-vertical":{right:"auto",left:0},".os-host-rtl>.os-scrollbar-corner":{right:"auto",left:0},".os-scrollbar-auto-hidden, .os-padding+.os-scrollbar-corner, .os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-corner, .os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal, .os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-corner, .os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical, .os-scrollbar-horizontal.os-scrollbar-auto-hidden+.os-scrollbar-vertical+.os-scrollbar-corner, .os-scrollbar-horizontal+.os-scrollbar-vertical.os-scrollbar-auto-hidden+.os-scrollbar-corner, .os-scrollbar-horizontal.os-scrollbar-auto-hidden+.os-scrollbar-vertical.os-scrollbar-auto-hidden+.os-scrollbar-corner":{opacity:0,visibility:"hidden",pointerEvents:"none"},".os-scrollbar-corner-resize-both":{cursor:"nwse-resize"},".os-host-rtl>.os-scrollbar-corner-resize-both":{cursor:"nesw-resize"},".os-scrollbar-corner-resize-horizontal":{cursor:"ew-resize"},".os-scrollbar-corner-resize-vertical":{cursor:"ns-resize"},".os-dragging .os-scrollbar-corner.os-scrollbar-corner-resize":{cursor:"default"},".os-host-resize-disabled.os-host-scrollbar-horizontal-hidden>.os-scrollbar-vertical":{top:0,bottom:0},".os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-horizontal, .os-host-rtl.os-host-resize-disabled.os-host-scrollbar-vertical-hidden>.os-scrollbar-horizontal":{right:0,left:0},".os-scrollbar:hover, .os-scrollbar-corner.os-scrollbar-corner-resize":{opacity:"1!important",visibility:"visible!important"},".os-scrollbar-corner.os-scrollbar-corner-resize":{backgroundImage:"linear-gradient(135deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.4) 100%)",backgroundRepeat:"no-repeat",backgroundPosition:"100% 100%",pointerEvents:"auto!important"},".os-host-rtl>.os-scrollbar-corner.os-scrollbar-corner-resize":{transform:"scale(-1,1)"},".os-host-overflow":{overflow:"hidden!important"},".os-theme-dark.os-host-rtl>.os-scrollbar-horizontal":{left:10,right:0},".os-scrollbar.os-scrollbar-unusable":{background:0},".os-scrollbar>.os-scrollbar-track":{background:0},".os-scrollbar-horizontal>.os-scrollbar-track>.os-scrollbar-handle":{minWidth:30},".os-scrollbar-vertical>.os-scrollbar-track>.os-scrollbar-handle":{minHeight:30},".os-theme-dark.os-host-transition>.os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle":{transition:"background-color .3s"},".os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle, .os-scrollbar>.os-scrollbar-track":{borderRadius:10},".os-scrollbar>.os-scrollbar-track>.os-scrollbar-handle":{background:theme.color.mediumdark,opacity:.5},".os-scrollbar:hover>.os-scrollbar-track>.os-scrollbar-handle":{opacity:.6},".os-scrollbar-horizontal .os-scrollbar-handle:before, .os-scrollbar-vertical .os-scrollbar-handle:before":{content:"''",position:"absolute",left:0,right:0,top:0,bottom:0,display:"block"},".os-theme-dark.os-host-scrollbar-horizontal-hidden>.os-scrollbar-horizontal .os-scrollbar-handle:before, .os-theme-dark.os-host-scrollbar-vertical-hidden>.os-scrollbar-vertical .os-scrollbar-handle:before":{display:"none"},".os-scrollbar-horizontal .os-scrollbar-handle:before":{top:-6,bottom:-2},".os-scrollbar-vertical .os-scrollbar-handle:before":{left:-6,right:-2},".os-host-rtl.os-scrollbar-vertical .os-scrollbar-handle:before":{right:-6,left:-2}}},GlobalScrollAreaStyles=function GlobalScrollAreaStyles(){return react__WEBPACK_IMPORTED_MODULE_2__.createElement(_storybook_theming__WEBPACK_IMPORTED_MODULE_3__.Global,{styles:getScrollAreaStyles})}}}]);
--------------------------------------------------------------------------------
/docs/701.0350a9c3.iframe.bundle.js:
--------------------------------------------------------------------------------
1 | "use strict";(self.webpackChunkreact_bootstrap_daterangepicker=self.webpackChunkreact_bootstrap_daterangepicker||[]).push([[701],{"./node_modules/@storybook/preview-web/dist/esm/renderDocs.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{renderDocs:()=>renderDocs,unmountDocs:()=>unmountDocs});__webpack_require__("./node_modules/regenerator-runtime/runtime.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.promise.js");var react=__webpack_require__("./node_modules/react/index.js"),react_dom=__webpack_require__("./node_modules/react-dom/index.js"),wrapper={fontSize:"14px",letterSpacing:"0.2px",margin:"10px 0"},main={margin:"auto",padding:30,borderRadius:10,background:"rgba(0,0,0,0.03)"},heading={textAlign:"center"},NoDocs=function NoDocs(){return react.createElement("div",{style:wrapper,className:"sb-nodocs sb-wrapper"},react.createElement("div",{style:main},react.createElement("h1",{style:heading},"No Docs"),react.createElement("p",null,"Sorry, but there are no docs for the selected story. To add them, set the story's ",react.createElement("code",null,"docs")," parameter. If you think this is an error:"),react.createElement("ul",null,react.createElement("li",null,"Please check the story definition."),react.createElement("li",null,"Please check the Storybook config."),react.createElement("li",null,"Try reloading the page.")),react.createElement("p",null,"If the problem persists, check the browser console, or the terminal you've run Storybook from.")))};function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function renderDocs(story,docsContext,element,callback){return function renderDocsAsync(_x,_x2,_x3){return _renderDocsAsync.apply(this,arguments)}(story,docsContext,element).then(callback)}function _renderDocsAsync(){return(_renderDocsAsync=_asyncToGenerator(regeneratorRuntime.mark((function _callee(story,docsContext,element){var _docs$getContainer,_docs$getPage,docs,DocsContainer,Page,docsElement;return regeneratorRuntime.wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(!(null!=(docs=story.parameters.docs)&&docs.getPage||null!=docs&&docs.page)||(null!=docs&&docs.getContainer||null!=docs&&docs.container)){_context.next=3;break}throw new Error("No `docs.container` set, did you run `addon-docs/preset`?");case 3:if(_context.t1=docs.container,_context.t1){_context.next=8;break}return _context.next=7,null===(_docs$getContainer=docs.getContainer)||void 0===_docs$getContainer?void 0:_docs$getContainer.call(docs);case 7:_context.t1=_context.sent;case 8:if(_context.t0=_context.t1,_context.t0){_context.next=11;break}_context.t0=function(_ref){var children=_ref.children;return react.createElement(react.Fragment,null,children)};case 11:if(DocsContainer=_context.t0,_context.t3=docs.page,_context.t3){_context.next=17;break}return _context.next=16,null===(_docs$getPage=docs.getPage)||void 0===_docs$getPage?void 0:_docs$getPage.call(docs);case 16:_context.t3=_context.sent;case 17:if(_context.t2=_context.t3,_context.t2){_context.next=20;break}_context.t2=NoDocs;case 20:return Page=_context.t2,docsElement=react.createElement(DocsContainer,{key:story.componentId,context:docsContext},react.createElement(Page,null)),_context.next=24,new Promise((function(resolve){react_dom.render(docsElement,element,resolve)}));case 24:case"end":return _context.stop()}}),_callee)})))).apply(this,arguments)}function unmountDocs(element){react_dom.unmountComponentAtNode(element)}NoDocs.displayName="NoDocs"}}]);
--------------------------------------------------------------------------------
/docs/745.30e61d6f.iframe.bundle.js:
--------------------------------------------------------------------------------
1 | "use strict";(self.webpackChunkreact_bootstrap_daterangepicker=self.webpackChunkreact_bootstrap_daterangepicker||[]).push([[745],{"./node_modules/react-dom/client.js":(__unused_webpack_module,exports,__webpack_require__)=>{var m=__webpack_require__("./node_modules/react-dom/index.js");exports.createRoot=m.createRoot,exports.hydrateRoot=m.hydrateRoot}}]);
--------------------------------------------------------------------------------
/docs/807.9cdb6310ad57fd2e91e1.manager.bundle.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /**
2 | * @license
3 | * Copyright Google Inc. All Rights Reserved.
4 | *
5 | * Use of this source code is governed by an MIT-style license that can be
6 | * found in the LICENSE file at https://angular.io/license
7 | */
8 |
9 | /**
10 | * @license
11 | * Copyright Google Inc. All Rights Reserved.
12 | *
13 | * Use of this source code is governed by an MIT-style license that can be
14 | * found in the LICENSE file at https://angular.io/license
15 | */
16 |
17 | /**
18 | * @license
19 | * Copyright Google Inc. All Rights Reserved.
20 | *
21 | * Use of this source code is governed by an MIT-style license that can be
22 | * found in the LICENSE file at https://angular.io/license
23 | */
24 |
25 | /**
26 | * @license
27 | * Copyright Google Inc. All Rights Reserved.
28 | *
29 | * Use of this source code is governed by an MIT-style license that can be
30 | * found in the LICENSE file at https://angular.io/license
31 | */
32 |
--------------------------------------------------------------------------------
/docs/897.625210eaaa3c9980fc12.manager.bundle.js.LICENSE.txt:
--------------------------------------------------------------------------------
1 | /*!
2 | * OverlayScrollbars
3 | * https://github.com/KingSora/OverlayScrollbars
4 | *
5 | * Version: 1.13.0
6 | *
7 | * Copyright KingSora | Rene Haas.
8 | * https://github.com/KingSora
9 | *
10 | * Released under the MIT license.
11 | * Date: 02.08.2020
12 | */
13 |
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/skratchdot/react-bootstrap-daterangepicker/9268dc47c4300c1f26e03acd4ca3e9d71c5cdb1d/docs/favicon.ico
--------------------------------------------------------------------------------
/docs/iframe.html:
--------------------------------------------------------------------------------
1 | Webpack AppName | Description | Default | Control |
---|
propertyName* | This is a short description | defaultValue | |
propertyName* | This is a short description | defaultValue | |
propertyName* | This is a short description | defaultValue | |
No Preview
Sorry, but you either have no stories or none are selected somehow.
- Please check the Storybook config.
- Try reloading the page.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 | Webpack App
--------------------------------------------------------------------------------
/docs/main.10dc05af.iframe.bundle.js:
--------------------------------------------------------------------------------
1 | (self.webpackChunkreact_bootstrap_daterangepicker=self.webpackChunkreact_bootstrap_daterangepicker||[]).push([[179],{"./src/index.stories.js":(module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__);__webpack_require__("./node_modules/core-js/modules/es.parse-int.js"),__webpack_require__("./node_modules/core-js/modules/es.date.now.js"),__webpack_require__("./node_modules/core-js/modules/es.date.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.array.is-array.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.description.js"),__webpack_require__("./node_modules/core-js/modules/es.object.to-string.js"),__webpack_require__("./node_modules/core-js/modules/es.symbol.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.string.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.iterator.js"),__webpack_require__("./node_modules/core-js/modules/web.dom-collections.iterator.js"),__webpack_require__("./node_modules/core-js/modules/es.array.slice.js"),__webpack_require__("./node_modules/core-js/modules/es.function.name.js"),__webpack_require__("./node_modules/core-js/modules/es.array.from.js");var react=__webpack_require__("./node_modules/react/index.js"),jquery=__webpack_require__("./node_modules/jquery/dist/jquery.js"),jquery_default=__webpack_require__.n(jquery),moment=__webpack_require__("./node_modules/moment/moment.js"),moment_default=__webpack_require__.n(moment),client=__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js"),esm=__webpack_require__("./node_modules/@storybook/addon-actions/dist/esm/index.js"),dist=__webpack_require__("./node_modules/@storybook/addon-knobs/dist/index.js");__webpack_require__("./node_modules/core-js/modules/es.function.bind.js"),__webpack_require__("./node_modules/core-js/modules/es.array.for-each.js"),__webpack_require__("./node_modules/core-js/modules/es.object.set-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.object.get-prototype-of.js"),__webpack_require__("./node_modules/core-js/modules/es.reflect.construct.js"),__webpack_require__("./node_modules/core-js/modules/es.object.create.js"),__webpack_require__("./node_modules/core-js/modules/es.object.define-property.js"),__webpack_require__("./node_modules/bootstrap-daterangepicker/daterangepicker.js");function _defineProperties(target,props){for(var i=0;iarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i {\n const buttonLabel = text('label', 'click to open');\n return (\n \n \n \n );\n })\n .add('simple input', () => {\n return (\n \n \n \n );\n })\n .add('with start and end date', () => {\n const startDate = text('startDate', '1/1/2017');\n const endDate = text('endDate', '1/5/2017');\n return (\n \n \n \n );\n })\n .add('log events', () => {\n return (\n \n \n \n );\n })\n .add('date picker with dropdowns', () => {\n return (\n \n \n \n );\n })\n .add('single date picker', () => {\n return (\n {\n const years = moment().diff(start, 'years');\n alert('You are ' + years + ' years old!');\n }}\n >\n \n \n );\n })\n .add('date range picker with times', () => {\n return (\n \n \n \n );\n })\n .add('predefined date ranges', () => {\n const [state, setState] = useState({\n start: moment().subtract(29, 'days'),\n end: moment(),\n });\n const { start, end } = state;\n const handleCallback = (start, end) => {\n setState({ start, end });\n };\n const label =\n start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY');\n return (\n \n \n \n {label} \n
\n \n );\n })\n .add('input initially empty', () => {\n const handleApply = (event, picker) => {\n picker.element.val(\n picker.startDate.format('MM/DD/YYYY') +\n ' - ' +\n picker.endDate.format('MM/DD/YYYY')\n );\n };\n const handleCancel = (event, picker) => {\n picker.element.val('');\n };\n return (\n \n \n \n );\n })\n .add('set start date from \"outside\" the component', () => {\n const myRef = useRef();\n const changeStartDate = () => {\n myRef.current.setStartDate(moment().subtract(1, 'week'));\n };\n return (\n \n \n \n \n
\n \n
\n );\n })\n .add('use onCallback to display start/end dates', () => {\n const [state, setState] = useState();\n const handleCallback = (start, end) => {\n setState({ start, end });\n };\n return (\n <>\n \n \n \n
\n \n startDate: {state?.start?.format('MM/DD/YYYY (dddd)')}\n
\n \n endDate: {state?.end?.format('MM/DD/YYYY (dddd)')}\n
\n >\n );\n })\n .add('change initialSettings (range data)', () => {\n const StoryComp = () => {\n const changeButtonLabel = text(\n 'change button label',\n 'change range label'\n );\n const keyRef = useRef(Date.now());\n const [dates, setDates] = useState({\n startDate: moment('2020/03/01'),\n endDate: moment('2020/03/15'),\n });\n const [ranges, setRanges] = useState({\n ['First Range']: [\n moment().subtract(2, 'days'),\n moment().add(2, 'days'),\n ],\n });\n const handleApply = (event, picker) => {\n setDates({\n startDate: picker.startDate,\n endDate: picker.endDate,\n });\n };\n const randomNumber = () => Math.floor(Math.random() * 20) + 1;\n const handleChangeRanges = () => {\n keyRef.current = Date.now();\n setRanges({\n [`Range ${Date.now()}`]: [\n moment().subtract(randomNumber(), 'days').startOf('day'),\n moment().add(randomNumber(), 'days').startOf('day'),\n ],\n });\n };\n return (\n \n \n \n \n
\n
\n startDate: {dates.startDate.format()}\n
\n \n endDate: {dates.endDate.format()}\n
\n \n ranges: {JSON.stringify(ranges)}\n
\n \n \n );\n };\n return (\n \n \n
\n );\n });\n",locationsMap:{"change-initialsettings-range-data":{startLoc:{col:7,line:226},endLoc:{col:3,line:299},startBody:{col:46,line:226},endBody:{col:3,line:299}},"use-oncallback-to-display-start-end-dates":{startLoc:{col:7,line:206},endLoc:{col:3,line:225},startBody:{col:52,line:206},endBody:{col:3,line:225}},"set-start-date-from-outside-the-component":{startLoc:{col:7,line:185},endLoc:{col:3,line:205},startBody:{col:54,line:185},endBody:{col:3,line:205}},"input-initially-empty":{startLoc:{col:7,line:159},endLoc:{col:3,line:184},startBody:{col:32,line:159},endBody:{col:3,line:184}},"predefined-date-ranges":{startLoc:{col:7,line:100},endLoc:{col:3,line:158},startBody:{col:33,line:100},endBody:{col:3,line:158}},"date-range-picker-with-times":{startLoc:{col:7,line:84},endLoc:{col:3,line:99},startBody:{col:39,line:84},endBody:{col:3,line:99}},"single-date-picker":{startLoc:{col:7,line:65},endLoc:{col:3,line:83},startBody:{col:29,line:65},endBody:{col:3,line:83}},"date-picker-with-dropdowns":{startLoc:{col:7,line:58},endLoc:{col:3,line:64},startBody:{col:37,line:58},endBody:{col:3,line:64}},"log-events":{startLoc:{col:7,line:42},endLoc:{col:3,line:57},startBody:{col:21,line:42},endBody:{col:3,line:57}},"with-start-and-end-date":{startLoc:{col:7,line:33},endLoc:{col:3,line:41},startBody:{col:34,line:33},endBody:{col:3,line:41}},"simple-input":{startLoc:{col:7,line:26},endLoc:{col:3,line:32},startBody:{col:23,line:26},endBody:{col:3,line:32}},"simple-button":{startLoc:{col:7,line:16},endLoc:{col:3,line:25},startBody:{col:24,line:16},endBody:{col:3,line:25}}}}}).addDecorator(dist.withKnobs).add("simple button",(function(){var buttonLabel=(0,dist.text)("label","click to open");return(0,jsx_runtime.jsx)(src,{children:(0,jsx_runtime.jsx)("button",{type:"button",className:"btn btn-primary",children:buttonLabel})})})).add("simple input",(function(){return(0,jsx_runtime.jsx)(src,{children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4"})})})).add("with start and end date",(function(){var startDate=(0,dist.text)("startDate","1/1/2017"),endDate=(0,dist.text)("endDate","1/5/2017");return(0,jsx_runtime.jsx)(src,{initialSettings:{startDate,endDate},children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4"})})})).add("log events",(function(){return(0,jsx_runtime.jsx)(src,{onApply:(0,esm.action)("onApply"),onCancel:(0,esm.action)("onCancel"),onHide:(0,esm.action)("onHide"),onHideCalendar:(0,esm.action)("onHideCalendar"),onShow:(0,esm.action)("onShow"),onShowCalendar:(0,esm.action)("onShowCalendar"),onEvent:(0,esm.action)("onEvent"),onCallback:(0,esm.action)("onCallback"),children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4"})})})).add("date picker with dropdowns",(function(){return(0,jsx_runtime.jsx)(src,{initialSettings:{showDropdowns:!0},children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4"})})})).add("single date picker",(function(){return(0,jsx_runtime.jsx)(src,{initialSettings:{singleDatePicker:!0,showDropdowns:!0,startDate:"10/18/1984",minYear:1901,maxYear:parseInt(moment_default()().format("YYYY"),10)},onCallback:function onCallback(start){var years=moment_default()().diff(start,"years");alert("You are "+years+" years old!")},children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4"})})})).add("date range picker with times",(function(){return(0,jsx_runtime.jsx)(src,{initialSettings:{timePicker:!0,startDate:moment_default()().startOf("hour").toDate(),endDate:moment_default()().startOf("hour").add(32,"hour").toDate(),locale:{format:"M/DD hh:mm A"}},children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4"})})})).add("predefined date ranges",(function(){var _useState2=_slicedToArray((0,react.useState)({start:moment_default()().subtract(29,"days"),end:moment_default()()}),2),state=_useState2[0],setState=_useState2[1],start=state.start,end=state.end,label=start.format("MMMM D, YYYY")+" - "+end.format("MMMM D, YYYY");return(0,jsx_runtime.jsx)(src,{initialSettings:{startDate:start.toDate(),endDate:end.toDate(),ranges:{Today:[moment_default()().toDate(),moment_default()().toDate()],Yesterday:[moment_default()().subtract(1,"days").toDate(),moment_default()().subtract(1,"days").toDate()],"Last 7 Days":[moment_default()().subtract(6,"days").toDate(),moment_default()().toDate()],"Last 30 Days":[moment_default()().subtract(29,"days").toDate(),moment_default()().toDate()],"This Month":[moment_default()().startOf("month").toDate(),moment_default()().endOf("month").toDate()],"Last Month":[moment_default()().subtract(1,"month").startOf("month").toDate(),moment_default()().subtract(1,"month").endOf("month").toDate()]}},onCallback:function handleCallback(start,end){setState({start,end})},children:(0,jsx_runtime.jsxs)("div",{id:"reportrange",className:"col-4",style:{background:"#fff",cursor:"pointer",padding:"5px 10px",border:"1px solid #ccc",width:"100%"},children:[(0,jsx_runtime.jsx)("i",{className:"fa fa-calendar"})," ",(0,jsx_runtime.jsx)("span",{children:label})," ",(0,jsx_runtime.jsx)("i",{className:"fa fa-caret-down"})]})})})).add("input initially empty",(function(){return(0,jsx_runtime.jsx)(src,{initialSettings:{autoUpdateInput:!1,locale:{cancelLabel:"Clear"}},onApply:function handleApply(event,picker){picker.element.val(picker.startDate.format("MM/DD/YYYY")+" - "+picker.endDate.format("MM/DD/YYYY"))},onCancel:function handleCancel(event,picker){picker.element.val("")},children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4",defaultValue:""})})})).add('set start date from "outside" the component',(function(){var myRef=(0,react.useRef)();return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(src,{ref:myRef,children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4"})}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsx)("button",{type:"button",className:"btn btn-primary",onClick:function changeStartDate(){myRef.current.setStartDate(moment_default()().subtract(1,"week"))},children:"set startDate to 1 week ago"})]})})).add("use onCallback to display start/end dates",(function(){var _state$start,_state$end,_useState4=_slicedToArray((0,react.useState)(),2),state=_useState4[0],setState=_useState4[1];return(0,jsx_runtime.jsxs)(jsx_runtime.Fragment,{children:[(0,jsx_runtime.jsx)(src,{onCallback:function handleCallback(start,end){setState({start,end})},children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4"})}),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsxs)("h4",{children:["startDate: ",(0,jsx_runtime.jsx)("small",{children:null==state||null===(_state$start=state.start)||void 0===_state$start?void 0:_state$start.format("MM/DD/YYYY (dddd)")})]}),(0,jsx_runtime.jsxs)("h4",{children:["endDate: ",(0,jsx_runtime.jsx)("small",{children:null==state||null===(_state$end=state.end)||void 0===_state$end?void 0:_state$end.format("MM/DD/YYYY (dddd)")})]})]})})).add("change initialSettings (range data)",(function(){var StoryComp=function StoryComp(){var _useState9,changeButtonLabel=(0,dist.text)("change button label","change range label"),keyRef=(0,react.useRef)(Date.now()),_useState6=_slicedToArray((0,react.useState)({startDate:moment_default()("2020/03/01"),endDate:moment_default()("2020/03/15")}),2),dates=_useState6[0],setDates=_useState6[1],_useState8=_slicedToArray((0,react.useState)(((_useState9={})["First Range"]=[moment_default()().subtract(2,"days"),moment_default()().add(2,"days")],_useState9)),2),ranges=_useState8[0],setRanges=_useState8[1],randomNumber=function randomNumber(){return Math.floor(20*Math.random())+1};return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(src,{onApply:function handleApply(event,picker){setDates({startDate:picker.startDate,endDate:picker.endDate})},onCancel:(0,esm.action)("onCancel"),onEvent:(0,esm.action)("onEvent"),onHide:(0,esm.action)("onHide"),onHideCalendar:(0,esm.action)("onHideCalendar"),onShow:(0,esm.action)("onShow"),onShowCalendar:(0,esm.action)("onShowCalendar"),initialSettings:{ranges},children:(0,jsx_runtime.jsx)("input",{type:"text",className:"form-control col-4"})},keyRef.current),(0,jsx_runtime.jsx)("br",{}),(0,jsx_runtime.jsxs)("h4",{children:["startDate: ",(0,jsx_runtime.jsx)("small",{children:dates.startDate.format()})]}),(0,jsx_runtime.jsxs)("h4",{children:["endDate: ",(0,jsx_runtime.jsx)("small",{children:dates.endDate.format()})]}),(0,jsx_runtime.jsxs)("h4",{children:["ranges: ",(0,jsx_runtime.jsx)("small",{children:JSON.stringify(ranges)})]}),(0,jsx_runtime.jsx)("button",{type:"button",className:"btn btn-primary",onClick:function handleChangeRanges(){var _setRanges;keyRef.current=Date.now(),setRanges(((_setRanges={})["Range "+Date.now()]=[moment_default()().subtract(randomNumber(),"days").startOf("day"),moment_default()().add(randomNumber(),"days").startOf("day")],_setRanges))},children:changeButtonLabel})]})};return(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(StoryComp,{})})}))},"./storybook-init-framework-entry.js":(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js")},"./node_modules/moment/locale sync recursive ^\\.\\/.*$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./af":"./node_modules/moment/locale/af.js","./af.js":"./node_modules/moment/locale/af.js","./ar":"./node_modules/moment/locale/ar.js","./ar-dz":"./node_modules/moment/locale/ar-dz.js","./ar-dz.js":"./node_modules/moment/locale/ar-dz.js","./ar-kw":"./node_modules/moment/locale/ar-kw.js","./ar-kw.js":"./node_modules/moment/locale/ar-kw.js","./ar-ly":"./node_modules/moment/locale/ar-ly.js","./ar-ly.js":"./node_modules/moment/locale/ar-ly.js","./ar-ma":"./node_modules/moment/locale/ar-ma.js","./ar-ma.js":"./node_modules/moment/locale/ar-ma.js","./ar-sa":"./node_modules/moment/locale/ar-sa.js","./ar-sa.js":"./node_modules/moment/locale/ar-sa.js","./ar-tn":"./node_modules/moment/locale/ar-tn.js","./ar-tn.js":"./node_modules/moment/locale/ar-tn.js","./ar.js":"./node_modules/moment/locale/ar.js","./az":"./node_modules/moment/locale/az.js","./az.js":"./node_modules/moment/locale/az.js","./be":"./node_modules/moment/locale/be.js","./be.js":"./node_modules/moment/locale/be.js","./bg":"./node_modules/moment/locale/bg.js","./bg.js":"./node_modules/moment/locale/bg.js","./bm":"./node_modules/moment/locale/bm.js","./bm.js":"./node_modules/moment/locale/bm.js","./bn":"./node_modules/moment/locale/bn.js","./bn-bd":"./node_modules/moment/locale/bn-bd.js","./bn-bd.js":"./node_modules/moment/locale/bn-bd.js","./bn.js":"./node_modules/moment/locale/bn.js","./bo":"./node_modules/moment/locale/bo.js","./bo.js":"./node_modules/moment/locale/bo.js","./br":"./node_modules/moment/locale/br.js","./br.js":"./node_modules/moment/locale/br.js","./bs":"./node_modules/moment/locale/bs.js","./bs.js":"./node_modules/moment/locale/bs.js","./ca":"./node_modules/moment/locale/ca.js","./ca.js":"./node_modules/moment/locale/ca.js","./cs":"./node_modules/moment/locale/cs.js","./cs.js":"./node_modules/moment/locale/cs.js","./cv":"./node_modules/moment/locale/cv.js","./cv.js":"./node_modules/moment/locale/cv.js","./cy":"./node_modules/moment/locale/cy.js","./cy.js":"./node_modules/moment/locale/cy.js","./da":"./node_modules/moment/locale/da.js","./da.js":"./node_modules/moment/locale/da.js","./de":"./node_modules/moment/locale/de.js","./de-at":"./node_modules/moment/locale/de-at.js","./de-at.js":"./node_modules/moment/locale/de-at.js","./de-ch":"./node_modules/moment/locale/de-ch.js","./de-ch.js":"./node_modules/moment/locale/de-ch.js","./de.js":"./node_modules/moment/locale/de.js","./dv":"./node_modules/moment/locale/dv.js","./dv.js":"./node_modules/moment/locale/dv.js","./el":"./node_modules/moment/locale/el.js","./el.js":"./node_modules/moment/locale/el.js","./en-au":"./node_modules/moment/locale/en-au.js","./en-au.js":"./node_modules/moment/locale/en-au.js","./en-ca":"./node_modules/moment/locale/en-ca.js","./en-ca.js":"./node_modules/moment/locale/en-ca.js","./en-gb":"./node_modules/moment/locale/en-gb.js","./en-gb.js":"./node_modules/moment/locale/en-gb.js","./en-ie":"./node_modules/moment/locale/en-ie.js","./en-ie.js":"./node_modules/moment/locale/en-ie.js","./en-il":"./node_modules/moment/locale/en-il.js","./en-il.js":"./node_modules/moment/locale/en-il.js","./en-in":"./node_modules/moment/locale/en-in.js","./en-in.js":"./node_modules/moment/locale/en-in.js","./en-nz":"./node_modules/moment/locale/en-nz.js","./en-nz.js":"./node_modules/moment/locale/en-nz.js","./en-sg":"./node_modules/moment/locale/en-sg.js","./en-sg.js":"./node_modules/moment/locale/en-sg.js","./eo":"./node_modules/moment/locale/eo.js","./eo.js":"./node_modules/moment/locale/eo.js","./es":"./node_modules/moment/locale/es.js","./es-do":"./node_modules/moment/locale/es-do.js","./es-do.js":"./node_modules/moment/locale/es-do.js","./es-mx":"./node_modules/moment/locale/es-mx.js","./es-mx.js":"./node_modules/moment/locale/es-mx.js","./es-us":"./node_modules/moment/locale/es-us.js","./es-us.js":"./node_modules/moment/locale/es-us.js","./es.js":"./node_modules/moment/locale/es.js","./et":"./node_modules/moment/locale/et.js","./et.js":"./node_modules/moment/locale/et.js","./eu":"./node_modules/moment/locale/eu.js","./eu.js":"./node_modules/moment/locale/eu.js","./fa":"./node_modules/moment/locale/fa.js","./fa.js":"./node_modules/moment/locale/fa.js","./fi":"./node_modules/moment/locale/fi.js","./fi.js":"./node_modules/moment/locale/fi.js","./fil":"./node_modules/moment/locale/fil.js","./fil.js":"./node_modules/moment/locale/fil.js","./fo":"./node_modules/moment/locale/fo.js","./fo.js":"./node_modules/moment/locale/fo.js","./fr":"./node_modules/moment/locale/fr.js","./fr-ca":"./node_modules/moment/locale/fr-ca.js","./fr-ca.js":"./node_modules/moment/locale/fr-ca.js","./fr-ch":"./node_modules/moment/locale/fr-ch.js","./fr-ch.js":"./node_modules/moment/locale/fr-ch.js","./fr.js":"./node_modules/moment/locale/fr.js","./fy":"./node_modules/moment/locale/fy.js","./fy.js":"./node_modules/moment/locale/fy.js","./ga":"./node_modules/moment/locale/ga.js","./ga.js":"./node_modules/moment/locale/ga.js","./gd":"./node_modules/moment/locale/gd.js","./gd.js":"./node_modules/moment/locale/gd.js","./gl":"./node_modules/moment/locale/gl.js","./gl.js":"./node_modules/moment/locale/gl.js","./gom-deva":"./node_modules/moment/locale/gom-deva.js","./gom-deva.js":"./node_modules/moment/locale/gom-deva.js","./gom-latn":"./node_modules/moment/locale/gom-latn.js","./gom-latn.js":"./node_modules/moment/locale/gom-latn.js","./gu":"./node_modules/moment/locale/gu.js","./gu.js":"./node_modules/moment/locale/gu.js","./he":"./node_modules/moment/locale/he.js","./he.js":"./node_modules/moment/locale/he.js","./hi":"./node_modules/moment/locale/hi.js","./hi.js":"./node_modules/moment/locale/hi.js","./hr":"./node_modules/moment/locale/hr.js","./hr.js":"./node_modules/moment/locale/hr.js","./hu":"./node_modules/moment/locale/hu.js","./hu.js":"./node_modules/moment/locale/hu.js","./hy-am":"./node_modules/moment/locale/hy-am.js","./hy-am.js":"./node_modules/moment/locale/hy-am.js","./id":"./node_modules/moment/locale/id.js","./id.js":"./node_modules/moment/locale/id.js","./is":"./node_modules/moment/locale/is.js","./is.js":"./node_modules/moment/locale/is.js","./it":"./node_modules/moment/locale/it.js","./it-ch":"./node_modules/moment/locale/it-ch.js","./it-ch.js":"./node_modules/moment/locale/it-ch.js","./it.js":"./node_modules/moment/locale/it.js","./ja":"./node_modules/moment/locale/ja.js","./ja.js":"./node_modules/moment/locale/ja.js","./jv":"./node_modules/moment/locale/jv.js","./jv.js":"./node_modules/moment/locale/jv.js","./ka":"./node_modules/moment/locale/ka.js","./ka.js":"./node_modules/moment/locale/ka.js","./kk":"./node_modules/moment/locale/kk.js","./kk.js":"./node_modules/moment/locale/kk.js","./km":"./node_modules/moment/locale/km.js","./km.js":"./node_modules/moment/locale/km.js","./kn":"./node_modules/moment/locale/kn.js","./kn.js":"./node_modules/moment/locale/kn.js","./ko":"./node_modules/moment/locale/ko.js","./ko.js":"./node_modules/moment/locale/ko.js","./ku":"./node_modules/moment/locale/ku.js","./ku.js":"./node_modules/moment/locale/ku.js","./ky":"./node_modules/moment/locale/ky.js","./ky.js":"./node_modules/moment/locale/ky.js","./lb":"./node_modules/moment/locale/lb.js","./lb.js":"./node_modules/moment/locale/lb.js","./lo":"./node_modules/moment/locale/lo.js","./lo.js":"./node_modules/moment/locale/lo.js","./lt":"./node_modules/moment/locale/lt.js","./lt.js":"./node_modules/moment/locale/lt.js","./lv":"./node_modules/moment/locale/lv.js","./lv.js":"./node_modules/moment/locale/lv.js","./me":"./node_modules/moment/locale/me.js","./me.js":"./node_modules/moment/locale/me.js","./mi":"./node_modules/moment/locale/mi.js","./mi.js":"./node_modules/moment/locale/mi.js","./mk":"./node_modules/moment/locale/mk.js","./mk.js":"./node_modules/moment/locale/mk.js","./ml":"./node_modules/moment/locale/ml.js","./ml.js":"./node_modules/moment/locale/ml.js","./mn":"./node_modules/moment/locale/mn.js","./mn.js":"./node_modules/moment/locale/mn.js","./mr":"./node_modules/moment/locale/mr.js","./mr.js":"./node_modules/moment/locale/mr.js","./ms":"./node_modules/moment/locale/ms.js","./ms-my":"./node_modules/moment/locale/ms-my.js","./ms-my.js":"./node_modules/moment/locale/ms-my.js","./ms.js":"./node_modules/moment/locale/ms.js","./mt":"./node_modules/moment/locale/mt.js","./mt.js":"./node_modules/moment/locale/mt.js","./my":"./node_modules/moment/locale/my.js","./my.js":"./node_modules/moment/locale/my.js","./nb":"./node_modules/moment/locale/nb.js","./nb.js":"./node_modules/moment/locale/nb.js","./ne":"./node_modules/moment/locale/ne.js","./ne.js":"./node_modules/moment/locale/ne.js","./nl":"./node_modules/moment/locale/nl.js","./nl-be":"./node_modules/moment/locale/nl-be.js","./nl-be.js":"./node_modules/moment/locale/nl-be.js","./nl.js":"./node_modules/moment/locale/nl.js","./nn":"./node_modules/moment/locale/nn.js","./nn.js":"./node_modules/moment/locale/nn.js","./oc-lnc":"./node_modules/moment/locale/oc-lnc.js","./oc-lnc.js":"./node_modules/moment/locale/oc-lnc.js","./pa-in":"./node_modules/moment/locale/pa-in.js","./pa-in.js":"./node_modules/moment/locale/pa-in.js","./pl":"./node_modules/moment/locale/pl.js","./pl.js":"./node_modules/moment/locale/pl.js","./pt":"./node_modules/moment/locale/pt.js","./pt-br":"./node_modules/moment/locale/pt-br.js","./pt-br.js":"./node_modules/moment/locale/pt-br.js","./pt.js":"./node_modules/moment/locale/pt.js","./ro":"./node_modules/moment/locale/ro.js","./ro.js":"./node_modules/moment/locale/ro.js","./ru":"./node_modules/moment/locale/ru.js","./ru.js":"./node_modules/moment/locale/ru.js","./sd":"./node_modules/moment/locale/sd.js","./sd.js":"./node_modules/moment/locale/sd.js","./se":"./node_modules/moment/locale/se.js","./se.js":"./node_modules/moment/locale/se.js","./si":"./node_modules/moment/locale/si.js","./si.js":"./node_modules/moment/locale/si.js","./sk":"./node_modules/moment/locale/sk.js","./sk.js":"./node_modules/moment/locale/sk.js","./sl":"./node_modules/moment/locale/sl.js","./sl.js":"./node_modules/moment/locale/sl.js","./sq":"./node_modules/moment/locale/sq.js","./sq.js":"./node_modules/moment/locale/sq.js","./sr":"./node_modules/moment/locale/sr.js","./sr-cyrl":"./node_modules/moment/locale/sr-cyrl.js","./sr-cyrl.js":"./node_modules/moment/locale/sr-cyrl.js","./sr.js":"./node_modules/moment/locale/sr.js","./ss":"./node_modules/moment/locale/ss.js","./ss.js":"./node_modules/moment/locale/ss.js","./sv":"./node_modules/moment/locale/sv.js","./sv.js":"./node_modules/moment/locale/sv.js","./sw":"./node_modules/moment/locale/sw.js","./sw.js":"./node_modules/moment/locale/sw.js","./ta":"./node_modules/moment/locale/ta.js","./ta.js":"./node_modules/moment/locale/ta.js","./te":"./node_modules/moment/locale/te.js","./te.js":"./node_modules/moment/locale/te.js","./tet":"./node_modules/moment/locale/tet.js","./tet.js":"./node_modules/moment/locale/tet.js","./tg":"./node_modules/moment/locale/tg.js","./tg.js":"./node_modules/moment/locale/tg.js","./th":"./node_modules/moment/locale/th.js","./th.js":"./node_modules/moment/locale/th.js","./tk":"./node_modules/moment/locale/tk.js","./tk.js":"./node_modules/moment/locale/tk.js","./tl-ph":"./node_modules/moment/locale/tl-ph.js","./tl-ph.js":"./node_modules/moment/locale/tl-ph.js","./tlh":"./node_modules/moment/locale/tlh.js","./tlh.js":"./node_modules/moment/locale/tlh.js","./tr":"./node_modules/moment/locale/tr.js","./tr.js":"./node_modules/moment/locale/tr.js","./tzl":"./node_modules/moment/locale/tzl.js","./tzl.js":"./node_modules/moment/locale/tzl.js","./tzm":"./node_modules/moment/locale/tzm.js","./tzm-latn":"./node_modules/moment/locale/tzm-latn.js","./tzm-latn.js":"./node_modules/moment/locale/tzm-latn.js","./tzm.js":"./node_modules/moment/locale/tzm.js","./ug-cn":"./node_modules/moment/locale/ug-cn.js","./ug-cn.js":"./node_modules/moment/locale/ug-cn.js","./uk":"./node_modules/moment/locale/uk.js","./uk.js":"./node_modules/moment/locale/uk.js","./ur":"./node_modules/moment/locale/ur.js","./ur.js":"./node_modules/moment/locale/ur.js","./uz":"./node_modules/moment/locale/uz.js","./uz-latn":"./node_modules/moment/locale/uz-latn.js","./uz-latn.js":"./node_modules/moment/locale/uz-latn.js","./uz.js":"./node_modules/moment/locale/uz.js","./vi":"./node_modules/moment/locale/vi.js","./vi.js":"./node_modules/moment/locale/vi.js","./x-pseudo":"./node_modules/moment/locale/x-pseudo.js","./x-pseudo.js":"./node_modules/moment/locale/x-pseudo.js","./yo":"./node_modules/moment/locale/yo.js","./yo.js":"./node_modules/moment/locale/yo.js","./zh-cn":"./node_modules/moment/locale/zh-cn.js","./zh-cn.js":"./node_modules/moment/locale/zh-cn.js","./zh-hk":"./node_modules/moment/locale/zh-hk.js","./zh-hk.js":"./node_modules/moment/locale/zh-hk.js","./zh-mo":"./node_modules/moment/locale/zh-mo.js","./zh-mo.js":"./node_modules/moment/locale/zh-mo.js","./zh-tw":"./node_modules/moment/locale/zh-tw.js","./zh-tw.js":"./node_modules/moment/locale/zh-tw.js"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./node_modules/moment/locale sync recursive ^\\.\\/.*$"},"./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.js)$":(module,__unused_webpack_exports,__webpack_require__)=>{var map={"./index.stories.js":"./src/index.stories.js"};function webpackContext(req){var id=webpackContextResolve(req);return __webpack_require__(id)}function webpackContextResolve(req){if(!__webpack_require__.o(map,req)){var e=new Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}return map[req]}webpackContext.keys=function webpackContextKeys(){return Object.keys(map)},webpackContext.resolve=webpackContextResolve,module.exports=webpackContext,webpackContext.id="./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.js)$"},"?4f7e":()=>{},"./generated-stories-entry.cjs":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module=__webpack_require__.nmd(module),(0,__webpack_require__("./node_modules/@storybook/react/dist/esm/client/index.js").configure)([__webpack_require__("./src sync recursive ^\\.(?:(?:^%7C\\/%7C(?:(?:(?%21(?:^%7C\\/)\\.).)*?)\\/)(?%21\\.)(?=.)[^/]*?\\.stories\\.js)$")],module,!1)}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[38],(()=>(__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/polyfills.js"),__webpack_exec__("./node_modules/@storybook/core-client/dist/esm/globals/globals.js"),__webpack_exec__("./storybook-init-framework-entry.js"),__webpack_exec__("./node_modules/@storybook/react/dist/esm/client/preview/config-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-actions/preview.js-generated-config-entry.js"),__webpack_exec__("./node_modules/@storybook/addon-knobs/dist/preset/addDecorator.js-generated-config-entry.js"),__webpack_exec__("./generated-stories-entry.cjs"))));__webpack_require__.O()}]);
--------------------------------------------------------------------------------
/docs/main.a20862c8c00eaecdc189.manager.bundle.js:
--------------------------------------------------------------------------------
1 | (self.webpackChunkreact_bootstrap_daterangepicker=self.webpackChunkreact_bootstrap_daterangepicker||[]).push([[179],{97715:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{"use strict";var esm=__webpack_require__(1173),dist_esm=(__webpack_require__(92222),__webpack_require__(68309),__webpack_require__(65316));const package_namespaceObject=JSON.parse('{"u2":"react-bootstrap-daterangepicker","i8":"8.0.0","Xh":"https://github.com/skratchdot/react-bootstrap-daterangepicker/"}'),theme=(0,dist_esm.create)({base:"light",brandTitle:"".concat(package_namespaceObject.u2," v").concat(package_namespaceObject.i8),brandUrl:package_namespaceObject.Xh});esm.KP.setConfig({theme})},24654:()=>{}},__webpack_require__=>{var __webpack_exec__=moduleId=>__webpack_require__(__webpack_require__.s=moduleId);__webpack_require__.O(0,[28],(()=>(__webpack_exec__(37707),__webpack_exec__(97715),__webpack_exec__(7967),__webpack_exec__(76710),__webpack_exec__(52852),__webpack_exec__(59802))));__webpack_require__.O()}]);
--------------------------------------------------------------------------------
/docs/project.json:
--------------------------------------------------------------------------------
1 | {"generatedAt":1661315549506,"builder":{"name":"webpack5"},"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"packageManager":{"type":"npm","version":"8.15.0"},"typescriptOptions":{"check":false,"checkOptions":{},"reactDocgen":"react-docgen-typescript","reactDocgenTypescriptOptions":{"shouldExtractLiteralValuesFromEnum":true}},"storybookVersion":"6.5.10","language":"typescript","storybookPackages":{"@storybook/addons":{"version":"6.5.10"},"@storybook/builder-webpack5":{"version":"6.5.10"},"@storybook/manager-webpack5":{"version":"6.5.10"},"@storybook/react":{"version":"6.5.10"},"@storybook/theming":{"version":"6.5.10"},"eslint-plugin-storybook":{"version":"0.6.4"}},"framework":{"name":"react"},"addons":{"@storybook/addon-actions":{"version":"6.5.10"},"@storybook/addon-knobs":{"version":"6.4.0"},"@storybook/addon-storysource":{"version":"6.5.10"}}}
2 |
--------------------------------------------------------------------------------
/docs/runtime~main.034739fce0fb7c30839b.manager.bundle.js:
--------------------------------------------------------------------------------
1 | (()=>{"use strict";var deferred,leafPrototypes,getProto,inProgress,__webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,deferred=[],__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(!chunkIds){var notFulfilled=1/0;for(i=0;i=priority)&&Object.keys(__webpack_require__.O).every((key=>__webpack_require__.O[key](chunkIds[j])))?chunkIds.splice(j--,1):(fulfilled=!1,priority0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority]},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode)return value;if("object"==typeof value&&value){if(4&mode&&value.__esModule)return value;if(16&mode&&"function"==typeof value.then)return value}var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach((key=>def[key]=()=>value[key]));return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce(((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises)),[])),__webpack_require__.u=chunkId=>chunkId+"."+{51:"94ab232695a89240eba0",229:"f5977af42d664affe404",295:"87668df083831d3d6399",551:"5b80c598a88ead76a32a",807:"9cdb6310ad57fd2e91e1",897:"625210eaaa3c9980fc12",935:"95edb50b7de67d965a21"}[chunkId]+".manager.bundle.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=module=>((module=Object.create(module)).children||(module.children=[]),Object.defineProperty(module,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+module.id)}}),module),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),inProgress={},__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url])inProgress[url].push(done);else{var script,needAttach;if(void 0!==key)for(var scripts=document.getElementsByTagName("script"),i=0;i{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach((fn=>fn(event))),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}},__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{var installedChunks={303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData)if(installedChunkData)promises.push(installedChunkData[2]);else if(303!=chunkId){var promise=new Promise(((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]));promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=new Error;__webpack_require__.l(url,(event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}}),"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,[chunkIds,moreModules,runtime]=data,i=0;if(chunkIds.some((id=>0!==installedChunks[id]))){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i{"use strict";var deferred,leafPrototypes,getProto,inProgress,__webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,deferred=[],__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(!chunkIds){var notFulfilled=1/0;for(i=0;i=priority)&&Object.keys(__webpack_require__.O).every((key=>__webpack_require__.O[key](chunkIds[j])))?chunkIds.splice(j--,1):(fulfilled=!1,priority0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority]},__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__,__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode)return value;if("object"==typeof value&&value){if(4&mode&&value.__esModule)return value;if(16&mode&&"function"==typeof value.then)return value}var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach((key=>def[key]=()=>value[key]));return def.default=()=>value,__webpack_require__.d(ns,def),ns},__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce(((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises)),[])),__webpack_require__.u=chunkId=>chunkId+"."+{701:"0350a9c3",745:"30e61d6f"}[chunkId]+".iframe.bundle.js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.hmd=module=>((module=Object.create(module)).children||(module.children=[]),Object.defineProperty(module,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+module.id)}}),module),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),inProgress={},__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url])inProgress[url].push(done);else{var script,needAttach;if(void 0!==key)for(var scripts=document.getElementsByTagName("script"),i=0;i{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach((fn=>fn(event))),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}},__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{var installedChunks={303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData)if(installedChunkData)promises.push(installedChunkData[2]);else if(303!=chunkId){var promise=new Promise(((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]));promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=new Error;__webpack_require__.l(url,(event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}}),"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,[chunkIds,moreModules,runtime]=data,i=0;if(chunkIds.some((id=>0!==installedChunks[id]))){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);isrc/__testutil__/setup.js'],
9 | testEnvironment: 'jsdom',
10 | };
11 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-bootstrap-daterangepicker",
3 | "version": "8.0.0",
4 | "description": "A date/time picker for react (using bootstrap). This is a react port of: https://github.com/dangrossman/bootstrap-daterangepicker",
5 | "main": "dist/index.js",
6 | "module": "dist/index.es.js",
7 | "jsnext:main": "dist/index.es.js",
8 | "types": "dist/index.d.ts",
9 | "files": [
10 | "dist/"
11 | ],
12 | "scripts": {
13 | "build": "npm-run-all clean build:options format lint cover build:lib build:storybook",
14 | "build:lib": "rollup -c",
15 | "build:options": "./scripts/build-options.js",
16 | "build:storybook": "build-storybook -c .storybook -o ./docs",
17 | "changelog": "github_changelog_generator -u skratchdot -p react-bootstrap-daterangepicker",
18 | "clean": "rimraf ./coverage/ ./docs/ ./dist/",
19 | "cover": "npm run test -- --coverage",
20 | "coveralls": "cat coverage/lcov.info | coveralls --verbose || exit 0",
21 | "format": "prettier --write --single-quote '**/*.{js,md}'",
22 | "lint": "eslint .",
23 | "start": "npm run watch",
24 | "storybook": "start-storybook -p 9001 -c .storybook",
25 | "test": "TZ=America/New_York jest",
26 | "watch": "npm-run-all --parallel watch:cover storybook",
27 | "watch:cover": "npm run cover -- --watch"
28 | },
29 | "author": "skratchdot",
30 | "homepage": "https://github.com/skratchdot/react-bootstrap-daterangepicker/",
31 | "repository": {
32 | "type": "git",
33 | "url": "git://github.com/skratchdot/react-bootstrap-daterangepicker.git"
34 | },
35 | "bugs": {
36 | "url": "https://github.com/skratchdot/react-bootstrap-daterangepicker/issues"
37 | },
38 | "license": "Apache-2.0",
39 | "peerDependencies": {
40 | "bootstrap-daterangepicker": "*",
41 | "jquery": "*",
42 | "moment": "*",
43 | "react": "*"
44 | },
45 | "devDependencies": {
46 | "@babel/cli": "^7.14.5",
47 | "@babel/core": "^7.14.6",
48 | "@babel/plugin-external-helpers": "^7.14.5",
49 | "@babel/preset-env": "^7.14.7",
50 | "@babel/preset-react": "^7.14.5",
51 | "@babel/preset-typescript": "^7.14.5",
52 | "@storybook/addon-actions": "^6.5.10",
53 | "@storybook/addon-knobs": "^6.3.0",
54 | "@storybook/addon-storysource": "^6.5.10",
55 | "@storybook/addons": "^6.5.10",
56 | "@storybook/builder-webpack5": "^6.5.10",
57 | "@storybook/manager-webpack5": "^6.5.10",
58 | "@storybook/react": "^6.5.10",
59 | "@storybook/theming": "^6.5.10",
60 | "@types/daterangepicker": "^3.1.4",
61 | "@types/jquery": "^3.5.6",
62 | "@types/react": "^18.0.17",
63 | "babel-core": "^7.0.0-bridge.0",
64 | "babel-eslint": "^10.1.0",
65 | "babel-jest": "^27.0.6",
66 | "babel-loader": "^8.2.2",
67 | "bootstrap": "^4.5.0",
68 | "bootstrap-daterangepicker": "^3.1.0",
69 | "cheerio": "^0.22.0",
70 | "coveralls": "^3.1.1",
71 | "enzyme": "^3.11.0",
72 | "enzyme-adapter-react-16": "^1.15.6",
73 | "eslint": "^7.30.0",
74 | "eslint-plugin-jsx-a11y": "^6.4.1",
75 | "eslint-plugin-react": "^7.24.0",
76 | "eslint-plugin-storybook": "^0.6.4",
77 | "identity-obj-proxy": "^3.0.0",
78 | "jest": "^27.0.6",
79 | "jquery": "^3.6.0",
80 | "lolex": "^6.0.0",
81 | "moment": "^2.29.1",
82 | "npm-run-all": "^4.1.5",
83 | "prettier": "^2.3.2",
84 | "react": "^18.2.0",
85 | "react-dom": "^18.2.0",
86 | "regenerator-runtime": "^0.13.5",
87 | "rimraf": "^3.0.2",
88 | "rollup": "^2.53.1",
89 | "rollup-plugin-babel": "^4.4.0",
90 | "rollup-plugin-node-resolve": "^5.2.0",
91 | "rollup-plugin-typescript2": "^0.33.0",
92 | "typescript": "^4.3.5",
93 | "wordwrap": "^1.0.0"
94 | },
95 | "keywords": [
96 | "react",
97 | "react-component",
98 | "bootstrap",
99 | "date",
100 | "range",
101 | "picker",
102 | "selector",
103 | "datetime",
104 | "ui"
105 | ]
106 | }
107 |
--------------------------------------------------------------------------------
/rollup.config.js:
--------------------------------------------------------------------------------
1 | import pkg from './package.json';
2 | import typescript from 'rollup-plugin-typescript2';
3 |
4 | export default {
5 | input: 'src/index.tsx',
6 | output: [
7 | {
8 | file: pkg.main,
9 | format: 'cjs',
10 | exports: 'named',
11 | sourcemap: true,
12 | },
13 | {
14 | file: pkg.module,
15 | format: 'es',
16 | exports: 'named',
17 | sourcemap: true,
18 | },
19 | ],
20 | plugins: [
21 | typescript({
22 | rollupCommonJSResolveHack: false,
23 | clean: true,
24 | }),
25 | ],
26 | external: ['bootstrap-daterangepicker', 'moment', 'jquery', 'react'],
27 | };
28 |
--------------------------------------------------------------------------------
/scripts/build-options.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | const cheerio = require('cheerio');
3 | const fs = require('fs');
4 | const wrap = require('wordwrap')(2, 80);
5 |
6 | const buildOptions = () => {
7 | const body = fs.readFileSync(
8 | `${__dirname}/../node_modules/bootstrap-daterangepicker/website/index.html`
9 | );
10 | const $ = cheerio.load(body);
11 | let options = $('#options')
12 | .parent()
13 | .next('ul')
14 | .find('li code')
15 | .map(function () {
16 | return $(this).text().trim();
17 | })
18 | .get();
19 | // add options that aren't documented
20 | options.push('template');
21 | // add legacy options
22 | options.push('applyClass');
23 | options.push('cancelClass');
24 | options.push('dateLimit');
25 | // de-dupe and sort
26 | options = options
27 | .filter(function (item, index) {
28 | return options.indexOf(item) === index;
29 | })
30 | .sort();
31 | // fs.writeFileSync(
32 | // './src/get-options.js',
33 | // [
34 | // '"use strict";',
35 | // '/* generated by scripts/build-options.js */',
36 | // 'export default () => {',
37 | // '\treturn ' + JSON.stringify(options, null, '\t\t') + ';',
38 | // '};',
39 | // ].join('\n'),
40 | // 'utf-8'
41 | // );
42 | // fix options that contain html strings
43 | const readmeOptions = options.map(function (option) {
44 | return option.replace(//gi, '>');
45 | });
46 | // update README.md
47 | const before =
48 | 'You can pass all the settings from the original plugin to the `initialSettings` prop:';
49 | const after = 'You can listen to the following 8 events:';
50 | const readme = fs.readFileSync('./README.md').toString();
51 | const newReadme =
52 | readme.slice(0, readme.indexOf(before) + before.length) +
53 | '\n\n- **' +
54 | wrap(readmeOptions.join(', ')).slice(2) +
55 | '**\n\n' +
56 | readme.slice(readme.indexOf(after));
57 | fs.writeFileSync('./README.md', newReadme, 'utf-8');
58 | return options;
59 | };
60 |
61 | const printMissingOptions = (includedOptions) => {
62 | const dateRangeOptions = fs
63 | .readFileSync(
64 | `${__dirname}/../node_modules/bootstrap-daterangepicker/daterangepicker.js`,
65 | 'utf-8'
66 | )
67 | .toString()
68 | .split(' ')
69 | .filter((item) => {
70 | return item.indexOf('options.') === 0;
71 | })
72 | .map((item) => {
73 | return item
74 | .split('.')[1]
75 | .split('[')[0]
76 | .replace(/[^a-zA-Z0-9<>]/gi, '');
77 | });
78 | const missingOptions = dateRangeOptions
79 | .filter((item, index) => {
80 | return dateRangeOptions.indexOf(item) === index;
81 | })
82 | .sort()
83 | .filter((item) => {
84 | return includedOptions.indexOf(item) === -1;
85 | });
86 | // eslint-disable-next-line
87 | console.log(missingOptions);
88 | };
89 |
90 | const printMissingPropTypes = () => {
91 | /*
92 | var DatePicker = require('../dist/bundle');
93 | var picker = new DatePicker();
94 | var missing = picker.options.filter(function (o) {
95 | return !DatePicker.propTypes.hasOwnProperty(o);
96 | });
97 | console.log(missing);
98 | */
99 | };
100 |
101 | const options = buildOptions();
102 | printMissingOptions(options);
103 | printMissingPropTypes();
104 |
--------------------------------------------------------------------------------
/src/__snapshots__/index.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`show picker with onShow handler 1`] = `
4 |
5 |
9 |
12 |
15 |
18 |
21 |
22 |
23 |
26 |
27 | |
28 |
32 | Jan 2018
33 | |
34 | |
35 |
36 |
37 |
38 | Su
39 | |
40 |
41 | Mo
42 | |
43 |
44 | Tu
45 | |
46 |
47 | We
48 | |
49 |
50 | Th
51 | |
52 |
53 | Fr
54 | |
55 |
56 | Sa
57 | |
58 |
59 |
60 |
61 |
62 |
66 | 31
67 | |
68 |
72 | 1
73 | |
74 |
78 | 2
79 | |
80 |
84 | 3
85 | |
86 |
90 | 4
91 | |
92 |
96 | 5
97 | |
98 |
102 | 6
103 | |
104 |
105 |
106 |
110 | 7
111 | |
112 |
116 | 8
117 | |
118 |
122 | 9
123 | |
124 |
128 | 10
129 | |
130 |
134 | 11
135 | |
136 |
140 | 12
141 | |
142 |
146 | 13
147 | |
148 |
149 |
150 |
154 | 14
155 | |
156 |
160 | 15
161 | |
162 |
166 | 16
167 | |
168 |
172 | 17
173 | |
174 |
178 | 18
179 | |
180 |
184 | 19
185 | |
186 |
190 | 20
191 | |
192 |
193 |
194 |
198 | 21
199 | |
200 |
204 | 22
205 | |
206 |
210 | 23
211 | |
212 |
216 | 24
217 | |
218 |
222 | 25
223 | |
224 |
228 | 26
229 | |
230 |
234 | 27
235 | |
236 |
237 |
238 |
242 | 28
243 | |
244 |
248 | 29
249 | |
250 |
254 | 30
255 | |
256 |
260 | 31
261 | |
262 |
266 | 1
267 | |
268 |
272 | 2
273 | |
274 |
278 | 3
279 | |
280 |
281 |
282 |
286 | 4
287 | |
288 |
292 | 5
293 | |
294 |
298 | 6
299 | |
300 |
304 | 7
305 | |
306 |
310 | 8
311 | |
312 |
316 | 9
317 | |
318 |
322 | 10
323 | |
324 |
325 |
326 |
327 |
328 |
332 |
333 |
336 |
339 |
342 |
343 |
344 | |
345 |
349 | Feb 2018
350 | |
351 |
354 |
355 | |
356 |
357 |
358 |
359 | Su
360 | |
361 |
362 | Mo
363 | |
364 |
365 | Tu
366 | |
367 |
368 | We
369 | |
370 |
371 | Th
372 | |
373 |
374 | Fr
375 | |
376 |
377 | Sa
378 | |
379 |
380 |
381 |
382 |
383 |
387 | 28
388 | |
389 |
393 | 29
394 | |
395 |
399 | 30
400 | |
401 |
405 | 31
406 | |
407 |
411 | 1
412 | |
413 |
417 | 2
418 | |
419 |
423 | 3
424 | |
425 |
426 |
427 |
431 | 4
432 | |
433 |
437 | 5
438 | |
439 |
443 | 6
444 | |
445 |
449 | 7
450 | |
451 |
455 | 8
456 | |
457 |
461 | 9
462 | |
463 |
467 | 10
468 | |
469 |
470 |
471 |
475 | 11
476 | |
477 |
481 | 12
482 | |
483 |
487 | 13
488 | |
489 |
493 | 14
494 | |
495 |
499 | 15
500 | |
501 |
505 | 16
506 | |
507 |
511 | 17
512 | |
513 |
514 |
515 |
519 | 18
520 | |
521 |
525 | 19
526 | |
527 |
531 | 20
532 | |
533 |
537 | 21
538 | |
539 |
543 | 22
544 | |
545 |
549 | 23
550 | |
551 |
555 | 24
556 | |
557 |
558 |
559 |
563 | 25
564 | |
565 |
569 | 26
570 | |
571 |
575 | 27
576 | |
577 |
581 | 28
582 | |
583 |
587 | 1
588 | |
589 |
593 | 2
594 | |
595 |
599 | 3
600 | |
601 |
602 |
603 |
607 | 4
608 | |
609 |
613 | 5
614 | |
615 |
619 | 6
620 | |
621 |
625 | 7
626 | |
627 |
631 | 8
632 | |
633 |
637 | 9
638 | |
639 |
643 | 10
644 | |
645 |
646 |
647 |
648 |
649 |
653 |
654 |
657 |
660 | 01/15/2018 - 01/15/2018
661 |
662 |
668 |
674 |
675 |
676 |
677 |
678 | `;
679 |
680 | exports[`simple picker with 1 child 1`] = `""`;
681 |
682 | exports[`simple picker with 1 child 2`] = `
683 |
684 |
687 |
690 |
701 |
712 |
715 |
718 |
724 |
731 |
732 |
733 |
734 |
735 | `;
736 |
--------------------------------------------------------------------------------
/src/__testutil__/setup.js:
--------------------------------------------------------------------------------
1 | import 'regenerator-runtime/runtime';
2 | import Enzyme from 'enzyme';
3 | import Adapter from 'enzyme-adapter-react-16';
4 |
5 | Enzyme.configure({ adapter: new Adapter() });
6 |
--------------------------------------------------------------------------------
/src/index.stories.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useRef } from 'react';
2 | import jQuery from 'jquery';
3 | import moment from 'moment';
4 | import { storiesOf } from '@storybook/react';
5 | import { action } from '@storybook/addon-actions';
6 | import { withKnobs, text } from '@storybook/addon-knobs';
7 | import DateRangePicker from './index';
8 | import 'bootstrap/dist/css/bootstrap.css';
9 | import 'bootstrap-daterangepicker/daterangepicker.css';
10 |
11 | // expose jQuery to window for debugging
12 | window.jQuery = window.$ = jQuery;
13 |
14 | storiesOf('DateRangePicker', module)
15 | .addDecorator(withKnobs)
16 | .add('simple button', () => {
17 | const buttonLabel = text('label', 'click to open');
18 | return (
19 |
20 |
23 |
24 | );
25 | })
26 | .add('simple input', () => {
27 | return (
28 |
29 |
30 |
31 | );
32 | })
33 | .add('with start and end date', () => {
34 | const startDate = text('startDate', '1/1/2017');
35 | const endDate = text('endDate', '1/5/2017');
36 | return (
37 |
38 |
39 |
40 | );
41 | })
42 | .add('log events', () => {
43 | return (
44 |
54 |
55 |
56 | );
57 | })
58 | .add('date picker with dropdowns', () => {
59 | return (
60 |
61 |
62 |
63 | );
64 | })
65 | .add('single date picker', () => {
66 | return (
67 | {
76 | const years = moment().diff(start, 'years');
77 | alert('You are ' + years + ' years old!');
78 | }}
79 | >
80 |
81 |
82 | );
83 | })
84 | .add('date range picker with times', () => {
85 | return (
86 |
96 |
97 |
98 | );
99 | })
100 | .add('predefined date ranges', () => {
101 | const [state, setState] = useState({
102 | start: moment().subtract(29, 'days'),
103 | end: moment(),
104 | });
105 | const { start, end } = state;
106 | const handleCallback = (start, end) => {
107 | setState({ start, end });
108 | };
109 | const label =
110 | start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY');
111 | return (
112 |
142 |
153 |
154 | {label}
155 |
156 |
157 | );
158 | })
159 | .add('input initially empty', () => {
160 | const handleApply = (event, picker) => {
161 | picker.element.val(
162 | picker.startDate.format('MM/DD/YYYY') +
163 | ' - ' +
164 | picker.endDate.format('MM/DD/YYYY')
165 | );
166 | };
167 | const handleCancel = (event, picker) => {
168 | picker.element.val('');
169 | };
170 | return (
171 |
181 |
182 |
183 | );
184 | })
185 | .add('set start date from "outside" the component', () => {
186 | const myRef = useRef();
187 | const changeStartDate = () => {
188 | myRef.current.setStartDate(moment().subtract(1, 'week'));
189 | };
190 | return (
191 |
192 |
193 |
194 |
195 |
196 |
203 |
204 | );
205 | })
206 | .add('use onCallback to display start/end dates', () => {
207 | const [state, setState] = useState();
208 | const handleCallback = (start, end) => {
209 | setState({ start, end });
210 | };
211 | return (
212 | <>
213 |
214 |
215 |
216 |
217 |
218 | startDate: {state?.start?.format('MM/DD/YYYY (dddd)')}
219 |
220 |
221 | endDate: {state?.end?.format('MM/DD/YYYY (dddd)')}
222 |
223 | >
224 | );
225 | })
226 | .add('change initialSettings (range data)', () => {
227 | const StoryComp = () => {
228 | const changeButtonLabel = text(
229 | 'change button label',
230 | 'change range label'
231 | );
232 | const keyRef = useRef(Date.now());
233 | const [dates, setDates] = useState({
234 | startDate: moment('2020/03/01'),
235 | endDate: moment('2020/03/15'),
236 | });
237 | const [ranges, setRanges] = useState({
238 | ['First Range']: [
239 | moment().subtract(2, 'days'),
240 | moment().add(2, 'days'),
241 | ],
242 | });
243 | const handleApply = (event, picker) => {
244 | setDates({
245 | startDate: picker.startDate,
246 | endDate: picker.endDate,
247 | });
248 | };
249 | const randomNumber = () => Math.floor(Math.random() * 20) + 1;
250 | const handleChangeRanges = () => {
251 | keyRef.current = Date.now();
252 | setRanges({
253 | [`Range ${Date.now()}`]: [
254 | moment().subtract(randomNumber(), 'days').startOf('day'),
255 | moment().add(randomNumber(), 'days').startOf('day'),
256 | ],
257 | });
258 | };
259 | return (
260 |
261 |
272 |
273 |
274 |
275 |
276 | startDate: {dates.startDate.format()}
277 |
278 |
279 | endDate: {dates.endDate.format()}
280 |
281 |
282 | ranges: {JSON.stringify(ranges)}
283 |
284 |
291 |
292 | );
293 | };
294 | return (
295 |
296 |
297 |
298 | );
299 | });
300 |
--------------------------------------------------------------------------------
/src/index.test.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | import $ from 'jquery';
4 | import DateRangePicker from './index';
5 | import lolex from 'lolex';
6 | import moment from 'moment';
7 | import { mount } from 'enzyme';
8 |
9 | beforeEach(() => {
10 | lolex.install({ now: new Date('2018/01/15 09:15:30') });
11 | document.body.innerHTML = '';
12 | });
13 |
14 | test.skip('simple picker with 1 child', async () => {
15 | const wrapper = mount(
16 |
17 |
18 |
19 | );
20 | expect(wrapper.html()).toMatchSnapshot();
21 | expect(document.body).toMatchSnapshot();
22 | });
23 |
24 | test('you cannot pass text as a child', async () => {
25 | expect(() => {
26 | mount(clickme);
27 | }).toThrow();
28 | });
29 |
30 | test('you cannot pass multiple children to the', async () => {
31 | expect(() => {
32 | mount(
33 |
34 | clickme
35 | clickme2
36 |
37 | );
38 | }).toThrow();
39 | });
40 |
41 | test.skip('show picker with onShow handler', async () => {
42 | const onShow = jest.fn();
43 | const wrapper = mount(
44 |
45 |
46 |
47 | );
48 | const afterRender = document.body.innerHTML;
49 | expect(onShow).not.toHaveBeenCalled();
50 | wrapper.instance().$picker.click();
51 | expect(onShow).toHaveBeenCalled();
52 | const afterShow = document.body.innerHTML;
53 | expect(afterShow).not.toEqual(afterRender);
54 | expect(document.body).toMatchSnapshot();
55 | });
56 |
57 | test.skip('picker with all event handlers', async () => {
58 | const onShow = jest.fn();
59 | const onHide = jest.fn();
60 | const onShowCalendar = jest.fn();
61 | const onHideCalendar = jest.fn();
62 | const onApply = jest.fn();
63 | const onCancel = jest.fn();
64 | const onEvent = jest.fn();
65 | const onCallback = jest.fn();
66 | const wrapper = mount(
67 |
77 |
78 |
79 | );
80 |
81 | // after render no events called
82 | expect(onShow).toHaveBeenCalledTimes(0);
83 | expect(onHide).toHaveBeenCalledTimes(0);
84 | expect(onShowCalendar).toHaveBeenCalledTimes(0);
85 | expect(onHideCalendar).toHaveBeenCalledTimes(0);
86 | expect(onApply).toHaveBeenCalledTimes(0);
87 | expect(onCancel).toHaveBeenCalledTimes(0);
88 | expect(onEvent).toHaveBeenCalledTimes(0);
89 | expect(onCallback).toHaveBeenCalledTimes(0);
90 |
91 | // open picker
92 | wrapper.instance().$picker.click();
93 | expect(onShow).toHaveBeenCalledTimes(1);
94 | expect(onHide).toHaveBeenCalledTimes(0);
95 | expect(onShowCalendar).toHaveBeenCalledTimes(1);
96 | expect(onHideCalendar).toHaveBeenCalledTimes(0);
97 | expect(onApply).toHaveBeenCalledTimes(0);
98 | expect(onCancel).toHaveBeenCalledTimes(0);
99 | expect(onEvent).toHaveBeenCalledTimes(2);
100 | expect(onCallback).toHaveBeenCalledTimes(0);
101 |
102 | // click 2 dates
103 | $(document.body).find('.drp-calendar.left [data-title="r2c3"]').mousedown();
104 | $(document.body).find('.drp-calendar.right [data-title="r2c3"]').mousedown();
105 |
106 | // cancel picker
107 | $(document.body).find('.cancelBtn').click();
108 | expect(onShow).toHaveBeenCalledTimes(1);
109 | expect(onHide).toHaveBeenCalledTimes(1);
110 | expect(onShowCalendar).toHaveBeenCalledTimes(2);
111 | expect(onHideCalendar).toHaveBeenCalledTimes(0);
112 | expect(onApply).toHaveBeenCalledTimes(0);
113 | expect(onCancel).toHaveBeenCalledTimes(1);
114 | expect(onEvent).toHaveBeenCalledTimes(5);
115 | expect(onCallback).toHaveBeenCalledTimes(0);
116 |
117 | // open picker again
118 | wrapper.instance().$picker.click();
119 | expect(onShow).toHaveBeenCalledTimes(2);
120 | expect(onHide).toHaveBeenCalledTimes(1);
121 | expect(onShowCalendar).toHaveBeenCalledTimes(3);
122 | expect(onHideCalendar).toHaveBeenCalledTimes(0);
123 | expect(onApply).toHaveBeenCalledTimes(0);
124 | expect(onCancel).toHaveBeenCalledTimes(1);
125 | expect(onEvent).toHaveBeenCalledTimes(7);
126 | expect(onCallback).toHaveBeenCalledTimes(0);
127 | const d1 = '2018-01-15T05:00:00.000Z';
128 | const d2 = '2018-01-16T04:59:59.999Z';
129 | expect(onCancel.mock.calls[0][1].oldStartDate.toISOString()).toEqual(d1);
130 | expect(onCancel.mock.calls[0][1].startDate.toISOString()).toEqual(d1);
131 | expect(onCancel.mock.calls[0][1].oldEndDate.toISOString()).toEqual(d2);
132 | expect(onCancel.mock.calls[0][1].endDate.toISOString()).toEqual(d2);
133 |
134 | // click 2 dates
135 | $(document.body).find('.drp-calendar.left [data-title="r2c3"]').mousedown();
136 | $(document.body).find('.drp-calendar.right [data-title="r2c3"]').mousedown();
137 |
138 | // apply picker
139 | $(document.body).find('.applyBtn').click();
140 | expect(onShow).toHaveBeenCalledTimes(2);
141 | expect(onHide).toHaveBeenCalledTimes(2);
142 | expect(onShowCalendar).toHaveBeenCalledTimes(4);
143 | expect(onHideCalendar).toHaveBeenCalledTimes(0);
144 | expect(onApply).toHaveBeenCalledTimes(1);
145 | expect(onCancel).toHaveBeenCalledTimes(1);
146 | expect(onEvent).toHaveBeenCalledTimes(10);
147 | expect(onCallback).toHaveBeenCalledTimes(1);
148 | const d3 = '2018-01-17T05:00:00.000Z';
149 | const d4 = '2018-02-15T04:59:59.999Z';
150 | expect(onCancel.mock.calls[0][1].oldStartDate.toISOString()).toEqual(d1);
151 | expect(onCancel.mock.calls[0][1].startDate.toISOString()).toEqual(d3);
152 | expect(onCancel.mock.calls[0][1].oldEndDate.toISOString()).toEqual(d2);
153 | expect(onCancel.mock.calls[0][1].endDate.toISOString()).toEqual(d4);
154 | });
155 |
156 | test.skip('change startDate after opening', async () => {
157 | const startDate = moment('2018-02-15T09:00:00.000Z');
158 | expect($('td.active').length).toEqual(0);
159 | const myRef = React.createRef();
160 | const wrapper = mount(
161 |
165 |
166 |
167 | );
168 |
169 | // open and close
170 | wrapper.instance().$picker.click();
171 | expect($('td.active').length).toEqual(1);
172 | expect($('td.active').text()).toEqual('15');
173 | wrapper.instance().$picker.click();
174 |
175 | // change startDate
176 | console.log(wrapper.instance());
177 | //wrapper.instance().$picker.setStartDate(moment('2018-10-25T09:00:00.000Z'));
178 | // open and close
179 | wrapper.instance().$picker.click();
180 | expect($('td.active').length).toEqual(1);
181 | expect($('td.active').text()).toEqual('25');
182 | wrapper.instance().$picker.click();
183 | });
184 |
185 | test.skip('daterangepicker is destroyed during componentWillUnmount()', async () => {
186 | expect($('.daterangepicker').length).toEqual(0);
187 | const wrapper = mount(
188 |
189 |
190 |
191 | );
192 | expect($('.daterangepicker').length).toEqual(1);
193 | wrapper.unmount();
194 | expect($('.daterangepicker').length).toEqual(0);
195 | });
196 |
197 | test.skip('unmount when internal ref is gone', async () => {
198 | expect($('.daterangepicker').length).toEqual(0);
199 | const wrapper = mount(
200 |
201 |
202 |
203 | );
204 | expect($('.daterangepicker').length).toEqual(1);
205 | const inst = wrapper.instance();
206 | inst.$picker = null;
207 | wrapper.unmount();
208 | expect($('.daterangepicker').length).toEqual(1);
209 | });
210 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import $ from 'jquery';
3 | import 'bootstrap-daterangepicker';
4 |
5 | export interface EventHandler {
6 | (event: JQuery.Event, picker: daterangepicker): any;
7 | }
8 | export interface CallbackHandler {
9 | (
10 | start?: daterangepicker.DateOrString,
11 | end?: daterangepicker.DateOrString,
12 | label?: string
13 | ): any;
14 | }
15 | export interface Props {
16 | initialSettings?: daterangepicker.Options;
17 |
18 | // events supported by the upstream lib
19 | onApply?: EventHandler;
20 | onCancel?: EventHandler;
21 | onHide?: EventHandler;
22 | onHideCalendar?: EventHandler;
23 | onShow?: EventHandler;
24 | onShowCalendar?: EventHandler;
25 |
26 | // custom events in this lib
27 | onEvent?: EventHandler;
28 | onCallback?: CallbackHandler;
29 | }
30 |
31 | export class DateRangePicker extends React.Component<
32 | React.PropsWithChildren
33 | > {
34 | ref: any;
35 | $picker: JQuery | null;
36 | constructor(props: Props) {
37 | super(props);
38 | this.ref = null;
39 | this.$picker = null;
40 | }
41 | componentDidMount() {
42 | // initialize daterangepicker
43 | this.$picker = $(this.ref);
44 | this.$picker.daterangepicker(
45 | this.props.initialSettings,
46 | this.handleCallback.bind(this)
47 | );
48 | // attach event listeners
49 | ['Show', 'Hide', 'ShowCalendar', 'HideCalendar', 'Apply', 'Cancel'].forEach(
50 | (event) => {
51 | const lcase = event.charAt(0).toLowerCase() + event.slice(1);
52 | this.$picker?.on(
53 | lcase + '.daterangepicker',
54 | this.makeEventHandler('on' + event)
55 | );
56 | }
57 | );
58 | }
59 | componentWillUnmount() {
60 | this.$picker?.data('daterangepicker')?.remove();
61 | }
62 | handleCallback(...args: any) {
63 | if (typeof this.props.onCallback === 'function') {
64 | this.props.onCallback(...args);
65 | }
66 | }
67 | makeEventHandler(eventType: string) {
68 | const { onEvent } = this.props;
69 | return (event: JQuery.Event, picker: daterangepicker) => {
70 | if (typeof onEvent === 'function') {
71 | onEvent(event, picker);
72 | }
73 | if (typeof (this.props as any)[eventType] === 'function') {
74 | (this.props as any)[eventType](event, picker);
75 | }
76 | };
77 | }
78 | setStartDate(dateOrString: daterangepicker.DateOrString) {
79 | this.$picker?.data('daterangepicker')?.setStartDate(dateOrString);
80 | }
81 | setEndDate(dateOrString: daterangepicker.DateOrString) {
82 | this.$picker?.data('daterangepicker')?.setEndDate(dateOrString);
83 | }
84 | render() {
85 | const childElement: any = React.Children.only(this.props.children);
86 | return React.cloneElement(childElement, {
87 | ref: (el: any) => (this.ref = el),
88 | });
89 | }
90 | }
91 |
92 | export default DateRangePicker;
93 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | /* Visit https://aka.ms/tsconfig.json to read more about this file */
4 |
5 | /* Basic Options */
6 | // "incremental": true, /* Enable incremental compilation */
7 | // "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
8 | // "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9 | // "lib": [], /* Specify library files to be included in the compilation. */
10 | // "allowJs": true, /* Allow javascript files to be compiled. */
11 | // "checkJs": true, /* Report errors in .js files. */
12 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
13 | "declaration": true, /* Generates corresponding '.d.ts' file. */
14 | "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
15 | "sourceMap": true, /* Generates corresponding '.map' file. */
16 | // "outFile": "./", /* Concatenate and emit output to single file. */
17 | // "outDir": "./", /* Redirect output structure to the directory. */
18 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
19 | // "composite": true, /* Enable project compilation */
20 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
21 | // "removeComments": true, /* Do not emit comments to output. */
22 | // "noEmit": true, /* Do not emit outputs. */
23 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */
24 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
25 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
26 |
27 | /* Strict Type-Checking Options */
28 | "strict": true, /* Enable all strict type-checking options. */
29 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
30 | // "strictNullChecks": true, /* Enable strict null checks. */
31 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */
32 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
33 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
34 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
35 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
36 |
37 | /* Additional Checks */
38 | // "noUnusedLocals": true, /* Report errors on unused locals. */
39 | // "noUnusedParameters": true, /* Report errors on unused parameters. */
40 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
41 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
42 |
43 | /* Module Resolution Options */
44 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
45 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
46 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
47 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
48 | // "typeRoots": [], /* List of folders to include type definitions from. */
49 | // "types": [], /* Type declaration files to be included in compilation. */
50 | "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
51 | // "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
52 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
53 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
54 |
55 | /* Source Map Options */
56 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
57 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
58 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
59 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
60 |
61 | /* Experimental Options */
62 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
63 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
64 |
65 | /* Advanced Options */
66 | // "skipLibCheck": true, /* Skip type checking of declaration files. */
67 | "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
68 | }
69 | }
70 |
--------------------------------------------------------------------------------