react-date-picker
Advanced tools
Comparing version 6.9.0 to 6.9.1
@@ -287,4 +287,6 @@ 'use strict'; | ||
isOpen: _propTypes2.default.bool, | ||
name: _propTypes2.default.string, | ||
returnValue: _propTypes2.default.oneOf(['start', 'end']), | ||
required: _propTypes2.default.bool, | ||
showLeadingZeros: _propTypes2.default.bool | ||
}); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
exports.formatMonthYear = exports.formatDate = undefined; | ||
exports.formatDate = undefined; | ||
@@ -37,8 +37,5 @@ var _locales = require('./locales'); | ||
// eslint-disable-next-line import/prefer-default-export | ||
var formatDate = exports.formatDate = function formatDate(date, locale) { | ||
return getFormatter({ day: 'numeric', month: 'numeric', year: 'numeric' }, locale)(date); | ||
}; | ||
var formatMonthYear = exports.formatMonthYear = function formatMonthYear(date, locale) { | ||
return getFormatter({ month: 'long', year: 'numeric' }, locale)(date); | ||
}; |
{ | ||
"name": "react-date-picker", | ||
"version": "6.9.0", | ||
"version": "6.9.1", | ||
"description": "A date picker for your React app.", | ||
@@ -68,5 +68,3 @@ "main": "dist/entry.js", | ||
"prop-types": "^15.6.0", | ||
"react": ">=15.5", | ||
"react-calendar": "^2.13.0", | ||
"react-dom": ">=15.5" | ||
"react-calendar": "^2.13.4" | ||
}, | ||
@@ -94,4 +92,10 @@ "devDependencies": { | ||
"less": "^2.7.3", | ||
"react": "^16.2.0", | ||
"react-dom": "^16.2.0", | ||
"react-test-renderer": "^16.2.0" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=15.5", | ||
"react-dom": ">=15.5" | ||
}, | ||
"files": [ | ||
@@ -98,0 +102,0 @@ "LICENSE", |
@@ -30,3 +30,3 @@ ![downloads](https://img.shields.io/npm/dt/react-date-picker.svg) ![build](https://img.shields.io/travis/wojtekmaj/react-date-picker.svg) ![dependencies](https://img.shields.io/david/wojtekmaj/react-date-picker.svg | ||
[Online demo](http://projekty.wojtekmaj.pl/react-date-picker/) is also available! | ||
[Online demo](http://projects.wojtekmaj.pl/react-date-picker/) is also available! | ||
@@ -33,0 +33,0 @@ ## Looking for a time picker or a datetime picker? |
@@ -70,2 +70,3 @@ import React, { PureComponent } from 'react'; | ||
const { disabled } = this.props; | ||
const [valueFrom] = [].concat(this.props.value); | ||
@@ -232,4 +233,6 @@ | ||
isOpen: PropTypes.bool, | ||
name: PropTypes.string, | ||
returnValue: PropTypes.oneOf(['start', 'end']), | ||
required: PropTypes.bool, | ||
showLeadingZeros: PropTypes.bool, | ||
}; |
@@ -1,5 +0,2 @@ | ||
import { | ||
formatDate, | ||
formatMonthYear, | ||
} from '../dateFormatter'; | ||
import { formatDate } from '../dateFormatter'; | ||
@@ -15,11 +12,1 @@ describe('formatDate', () => { | ||
}); | ||
describe('formatMonthYear', () => { | ||
it('returns proper month name and year', () => { | ||
const date = new Date(2017, 1, 1); | ||
const formattedDate = formatMonthYear(date, 'en-US'); | ||
expect(formattedDate).toBe('February 2017'); | ||
}); | ||
}); |
@@ -29,2 +29,3 @@ import { getDefaultLocale } from './locales'; | ||
// eslint-disable-next-line import/prefer-default-export | ||
export const formatDate = (date, locale) => getFormatter( | ||
@@ -34,6 +35,1 @@ { day: 'numeric', month: 'numeric', year: 'numeric' }, | ||
)(date); | ||
export const formatMonthYear = (date, locale) => getFormatter( | ||
{ month: 'long', year: 'numeric' }, | ||
locale, | ||
)(date); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
109918
23
2624
- Removedreact@>=15.5
- Removedreact-dom@>=15.5
Updatedreact-calendar@^2.13.4