Skip to content

Commit

Permalink
- Bugfixes of markedDates
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardxiao committed Oct 21, 2021
1 parent b0aab7e commit c0a3884
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions lib/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ var Index = /*#__PURE__*/function (_React$Component) {
}, /*#__PURE__*/_react["default"].createElement(_index["default"], {
size: size,
defaultDate: defaultDate,
markedDates: markedDates,
locale: locale,
onYearPicked: this.onYearPicked,
onMonthPicked: this.onMonthPicked,
Expand Down
2 changes: 1 addition & 1 deletion lib/components/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ exports.isValidDate = isValidDate;
var isValidDates = function isValidDates(arr) {
var isValid = false;

if (arr.length > 1) {
if (arr.length) {
isValid = true;
arr.forEach(function (v) {
if (!isValidDate(v)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/react-picky-date-time.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-picky-date-time.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-picky-date-time.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-picky-date-time.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-picky-date-time",
"version": "1.7.0",
"version": "1.7.1",
"description": "A react component for date time picker.",
"main": "index.js",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions src/js/PickyDateTime/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class Index extends React.Component {
<Calendar
size={size}
defaultDate={defaultDate}
markedDates={markedDates}
locale={locale}
onYearPicked={this.onYearPicked}
onMonthPicked={this.onMonthPicked}
Expand Down
2 changes: 1 addition & 1 deletion src/js/PickyDateTime/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const isValidDate = str => {
};
export const isValidDates = arr => {
let isValid = false;
if (arr.length > 1) {
if (arr.length) {
isValid = true;
arr.forEach(v => {
if (!isValidDate(v)) {
Expand Down

0 comments on commit c0a3884

Please sign in to comment.