Skip to content

Commit cd8024f

Browse files
committed
Merge branch 'develop'
2 parents fc1d53a + b5649c1 commit cd8024f

File tree

22 files changed

+232
-118
lines changed

22 files changed

+232
-118
lines changed

build/browser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/browser_plugins.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-multi-date-picker",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "a simple React datepicker component for work with gregorian, persian, arabic and indian calendars",
55
"main": "./build/index.js",
66
"types": "index.d.ts",
@@ -24,7 +24,7 @@
2424
"arabic",
2525
"english",
2626
"hindi",
27-
"locals",
27+
"locales",
2828
"datetime",
2929
"gregorian-calendar",
3030
"persian-calendar",
@@ -52,13 +52,13 @@
5252
"postcss": "8.2.2",
5353
"react": "^17.0.1",
5454
"react-dom": "^17.0.1",
55-
"rollup": "^2.35.1",
55+
"rollup": "^2.36.0",
5656
"rollup-plugin-peer-deps-external": "^2.2.4",
5757
"rollup-plugin-postcss": "^4.0.0",
5858
"rollup-plugin-terser": "^7.0.2"
5959
},
6060
"dependencies": {
61-
"react-date-object": "^1.1.8"
61+
"react-date-object": "^1.2.0"
6262
},
6363
"peerDependencies": {
6464
"react": ">=16.8.0",

plugins/all.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export { default as Settings } from "./all/settings/settings"
22
export { default as DatePickerHeader } from "./all/date_picker_header/date_picker_header"
33
export { default as MultiColors } from "./all/mutli_colors/multi_colors"
44
export { default as DatePanel } from "./all/date_panel/date_panel"
5-
export { default as Weekends } from "./all/weekends/weekends"
5+
export { default as Weekends } from "./all/weekends/weekends"
6+
export { default as Toolbar } from "./all/toolbar/toolbar"

plugins/all/date_panel/date_panel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function DatePanel({
1717
}) {
1818
let header = { en: "Dates", fa: "تاریخ ها", ar: "تواریخ", hi: "खजूर" },
1919
dates = [],
20-
{ multiple, range, inRangeDates, selectedDate, date: { local } } = state,
20+
{ multiple, range, inRangeDates, selectedDate, date: { locale } } = state,
2121
{ formattingIgnoreList } = calendarProps,
2222
classNames = ["rmpd-panel", position]
2323

@@ -84,7 +84,7 @@ export default function DatePanel({
8484
}}
8585
{...props}
8686
>
87-
<div className="rmdp-panel-header">{header[local]}</div>
87+
<div className="rmdp-panel-header">{header[locale]}</div>
8888
<div style={{ position: "relative", overflow: "auto", height: ["top", "bottom"].includes(position) ? "100px" : "" }}>
8989
<ul className="rmdp-panel-body">
9090
{Array.isArray(dates) && dates.map((object, index) => {

plugins/all/date_picker_header/date_picker_header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function DatePickerHeader({
88
size = "big",
99
nodes,
1010
calendar = state.calendar,
11-
local = state.local,
11+
locale = state.locale,
1212
className = "",
1313
...props
1414
}) {
@@ -23,7 +23,7 @@ export default function DatePickerHeader({
2323
selectedDate = new DateObject()
2424
}
2525

26-
selectedDate = new DateObject(selectedDate).set({ calendar, local })
26+
selectedDate = new DateObject(selectedDate).set({ calendar, locale })
2727

2828
let classNames = ["rmdp-header-plugin", position, size]
2929

plugins/all/mutli_colors/multi_colors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function MultiColors({
2626

2727
for (let i = 0; i < state.selectedDate.length; i++) {
2828
let date = state.selectedDate[i],
29-
value = new DateObject(date).setLocal("en").format("YYYYMMDD"),
29+
value = new DateObject(date).setLocale("en").format("YYYYMMDD"),
3030
color = date.color || activeColor
3131

3232
if (!date.color) state.selectedDate[i].color = color
@@ -123,7 +123,7 @@ function getMapDays(selectedDate, range, ref, activeColor) {
123123

124124
if (Array.isArray(selectedDate)) {
125125
//not single mode
126-
let value = new DateObject(date).setLocal("en").format("YYYYMMDD")
126+
let value = new DateObject(date).setLocale("en").format("YYYYMMDD")
127127

128128
if (ref.current.stringValues.includes(value)) color = ref.current.colors[value]
129129
}

plugins/all/settings/settings.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
border-radius: 15px;
2525
background-color: #0074d9;
2626
color: white;
27-
box-shadow: 0 0 3px 1px #ccc;
27+
box-shadow: 0 0 3px 1px var(--rmdp-shadow);
2828
display: flex;
2929
transition: 0.4s;
3030
margin: auto 3px;
@@ -63,7 +63,7 @@
6363

6464
.setting.active .items {
6565
flex: 1;
66-
box-shadow: inset 0 0 3px #ccc;
66+
box-shadow: inset 0 0 3px var(--rmdp-shadow);
6767
visibility: visible;
6868
flex: 1;
6969
display: flex;
@@ -83,7 +83,7 @@
8383

8484
.items .item {
8585
background-color: rgb(126, 166, 240);
86-
box-shadow: 0 0 3px 1px #ccc;
86+
box-shadow: 0 0 3px 1px var(--rmdp-shadow);
8787
width: 16px;
8888
height: 16px;
8989
margin: auto 0;
@@ -94,7 +94,7 @@
9494
}
9595

9696
.items .item.active {
97-
background-color: #0074d9;
97+
background-color: var(--rmdp-primary);
9898
color: white;
9999
}
100100

0 commit comments

Comments
 (0)