@pelcro/react-pelcro-js 2.6.0-beta.4 → 2.6.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +14 -3
- package/dist/index.esm.js +14 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -6584,6 +6584,17 @@ const getPaymentCardIcon$1 = name => {
|
|
|
6584
6584
|
d: "M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"
|
|
6585
6585
|
}));
|
|
6586
6586
|
};
|
|
6587
|
+
/**
|
|
6588
|
+
* Gets the current date with time set to 0
|
|
6589
|
+
* @param {Date} dateObject
|
|
6590
|
+
* @return {Date}
|
|
6591
|
+
*/
|
|
6592
|
+
|
|
6593
|
+
function getDateWithoutTime(dateObject) {
|
|
6594
|
+
const date = new Date(dateObject.getTime());
|
|
6595
|
+
date.setHours(0, 0, 0, 0);
|
|
6596
|
+
return date;
|
|
6597
|
+
}
|
|
6587
6598
|
|
|
6588
6599
|
const resources = {
|
|
6589
6600
|
en: {
|
|
@@ -18402,9 +18413,9 @@ const GiftCreateContainer = ({
|
|
|
18402
18413
|
}
|
|
18403
18414
|
|
|
18404
18415
|
if (giftRecipient.startDate) {
|
|
18405
|
-
const nowDate = new Date();
|
|
18406
|
-
const yearFromNowDate = new Date(new Date().setFullYear(nowDate.getFullYear() + 1));
|
|
18407
|
-
const submittedDate = new Date(giftRecipient.startDate);
|
|
18416
|
+
const nowDate = getDateWithoutTime(new Date());
|
|
18417
|
+
const yearFromNowDate = getDateWithoutTime(new Date(new Date().setFullYear(nowDate.getFullYear() + 1)));
|
|
18418
|
+
const submittedDate = getDateWithoutTime(new Date(giftRecipient.startDate));
|
|
18408
18419
|
|
|
18409
18420
|
if (submittedDate < nowDate || submittedDate > yearFromNowDate) {
|
|
18410
18421
|
dispatch({
|
package/dist/index.esm.js
CHANGED
|
@@ -6554,6 +6554,17 @@ const getPaymentCardIcon$1 = name => {
|
|
|
6554
6554
|
d: "M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"
|
|
6555
6555
|
}));
|
|
6556
6556
|
};
|
|
6557
|
+
/**
|
|
6558
|
+
* Gets the current date with time set to 0
|
|
6559
|
+
* @param {Date} dateObject
|
|
6560
|
+
* @return {Date}
|
|
6561
|
+
*/
|
|
6562
|
+
|
|
6563
|
+
function getDateWithoutTime(dateObject) {
|
|
6564
|
+
const date = new Date(dateObject.getTime());
|
|
6565
|
+
date.setHours(0, 0, 0, 0);
|
|
6566
|
+
return date;
|
|
6567
|
+
}
|
|
6557
6568
|
|
|
6558
6569
|
const resources = {
|
|
6559
6570
|
en: {
|
|
@@ -18372,9 +18383,9 @@ const GiftCreateContainer = ({
|
|
|
18372
18383
|
}
|
|
18373
18384
|
|
|
18374
18385
|
if (giftRecipient.startDate) {
|
|
18375
|
-
const nowDate = new Date();
|
|
18376
|
-
const yearFromNowDate = new Date(new Date().setFullYear(nowDate.getFullYear() + 1));
|
|
18377
|
-
const submittedDate = new Date(giftRecipient.startDate);
|
|
18386
|
+
const nowDate = getDateWithoutTime(new Date());
|
|
18387
|
+
const yearFromNowDate = getDateWithoutTime(new Date(new Date().setFullYear(nowDate.getFullYear() + 1)));
|
|
18388
|
+
const submittedDate = getDateWithoutTime(new Date(giftRecipient.startDate));
|
|
18378
18389
|
|
|
18379
18390
|
if (submittedDate < nowDate || submittedDate > yearFromNowDate) {
|
|
18380
18391
|
dispatch({
|