willba-component-library 0.2.42 → 0.2.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "willba-component-library",
3
- "version": "0.2.42",
3
+ "version": "0.2.43",
4
4
  "description": "A custom UI component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -61,7 +61,9 @@ export default function FilterCalendar({
61
61
  handleSelectedFilter: setToggleCalendar,
62
62
  })
63
63
 
64
- const nights = nightsCount({ calendarRange })
64
+ const nights = nightsCount({
65
+ calendarRange: calendarRange || initialCalendarRange,
66
+ })
65
67
 
66
68
  return (
67
69
  <div className={`will-root`} style={themePalette}>
@@ -99,7 +101,7 @@ export default function FilterCalendar({
99
101
  <div>
100
102
  <span>
101
103
  {parseDate({
102
- date: initialCalendarRange?.from || calendarRange?.from,
104
+ date: calendarRange?.from || initialCalendarRange?.from,
103
105
  dateFormat: 'EEEEEE d.M.yyyy',
104
106
  language,
105
107
  }) || t('common:checkIn')}
@@ -109,7 +111,7 @@ export default function FilterCalendar({
109
111
  </span>
110
112
  <span>
111
113
  {parseDate({
112
- date: initialCalendarRange?.to || calendarRange?.to,
114
+ date: calendarRange?.to || initialCalendarRange?.to,
113
115
  dateFormat: 'EEEEEE d.M.yyyy',
114
116
  language,
115
117
  }) || t('common:checkOut')}