@tripian/react 9.1.36 → 9.1.37
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/index.js +25 -24
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -78496,30 +78496,31 @@ const StepDestination = ({ tripProfile, destinations, setTripProfile, isTripEdit
|
|
|
78496
78496
|
}));
|
|
78497
78497
|
}, [tripProfile.arrivalDatetime, tripProfile.departureDatetime]);
|
|
78498
78498
|
const callbackDateRangePicker = (startDate, endDate) => {
|
|
78499
|
-
|
|
78500
|
-
|
|
78501
|
-
|
|
78502
|
-
|
|
78503
|
-
|
|
78504
|
-
|
|
78505
|
-
.
|
|
78506
|
-
|
|
78507
|
-
|
|
78508
|
-
|
|
78509
|
-
|
|
78510
|
-
|
|
78511
|
-
|
|
78512
|
-
|
|
78513
|
-
|
|
78514
|
-
.
|
|
78515
|
-
|
|
78516
|
-
|
|
78517
|
-
|
|
78518
|
-
|
|
78519
|
-
|
|
78520
|
-
|
|
78521
|
-
|
|
78522
|
-
|
|
78499
|
+
// Check if startDate and endDate are not null
|
|
78500
|
+
if (startDate && endDate) {
|
|
78501
|
+
const newTripProfile = { ...tripProfile };
|
|
78502
|
+
const notUtcStartDate = startDate.utcOffset(0);
|
|
78503
|
+
const notUtcEndDate = endDate.utcOffset(0);
|
|
78504
|
+
const newStartDate = { year: +notUtcStartDate.format('YYYY'), month: +notUtcStartDate.format('MM') - 1, day: +notUtcStartDate.format('DD') };
|
|
78505
|
+
const newEndDate = { year: +notUtcEndDate.format('YYYY'), month: +notUtcEndDate.format('MM') - 1, day: +notUtcEndDate.format('DD') };
|
|
78506
|
+
const startDateTime = (0, moment_1.default)(newTripProfile.arrivalDatetime)
|
|
78507
|
+
.set({
|
|
78508
|
+
year: newStartDate.year,
|
|
78509
|
+
month: newStartDate.month,
|
|
78510
|
+
date: newStartDate.day,
|
|
78511
|
+
})
|
|
78512
|
+
.utcOffset(0);
|
|
78513
|
+
newTripProfile.arrivalDatetime = `${startDateTime.format('YYYY')}-${startDateTime.format('MM')}-${startDateTime.format('DD')}T${newTripProfile.arrivalDatetime.split('T')[1]}`;
|
|
78514
|
+
const endDateTime = (0, moment_1.default)(newTripProfile.departureDatetime)
|
|
78515
|
+
.set({
|
|
78516
|
+
year: newEndDate.year,
|
|
78517
|
+
month: newEndDate.month,
|
|
78518
|
+
date: newEndDate.day,
|
|
78519
|
+
})
|
|
78520
|
+
.utcOffset(0);
|
|
78521
|
+
newTripProfile.departureDatetime = `${endDateTime.format('YYYY')}-${endDateTime.format('MM')}-${endDateTime.format('DD')}T${newTripProfile.departureDatetime.split('T')[1]}`;
|
|
78522
|
+
setTripProfile(newTripProfile);
|
|
78523
|
+
}
|
|
78523
78524
|
};
|
|
78524
78525
|
const callbackArrivalDateTime = (arrivalTime) => {
|
|
78525
78526
|
const newTripProfile = { ...tripProfile };
|