@granto-umbrella/umbrella-components 2.3.10 → 2.3.11

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": "@granto-umbrella/umbrella-components",
3
- "version": "2.3.10",
3
+ "version": "2.3.11",
4
4
  "description": "Umbrella Components for React",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -17,7 +17,9 @@ registerLocale("pt-BR", ptBR);
17
17
 
18
18
  // global overrides for the popup calendar
19
19
  export const DatePickerGlobalStyles = createGlobalStyle`
20
- /* … your existing .react-datepicker* overrides … */
20
+ .react-datepicker-wrapper {
21
+ display: flex !important;
22
+ }
21
23
  `;
22
24
 
23
25
  // wrapper around input + icon
@@ -14,7 +14,7 @@ import "react-datepicker/dist/react-datepicker.css";
14
14
 
15
15
  interface DatePickerInputProps {
16
16
  mode?: "single" | "range";
17
- selected: Date | [Date, Date];
17
+ selected: Date | [Date, Date] | null;
18
18
  onChange: (date: Date | [Date, Date]) => void;
19
19
  minDate?: Date;
20
20
  maxDate?: Date;
@@ -41,7 +41,6 @@ export const DatePickerInput: React.FC<DatePickerInputProps> = ({
41
41
  <DatePickerGlobalStyles />
42
42
 
43
43
  <InputWrapper>
44
- {/* the calendar icon */}
45
44
  <IconWrapper>
46
45
  <CalendarIcon size={16} />
47
46
  </IconWrapper>
@@ -50,9 +49,9 @@ export const DatePickerInput: React.FC<DatePickerInputProps> = ({
50
49
  <StyledDatePicker
51
50
  locale="pt-BR"
52
51
  selectsRange
53
- startDate={(selected as [Date, Date])[0] || undefined}
54
- endDate={(selected as [Date, Date])[1] || undefined}
55
- selected={(selected as [Date, Date])[0] || undefined}
52
+ startDate={(selected as [Date, Date])[0] || undefined || null}
53
+ endDate={(selected as [Date, Date])[1] || undefined || null}
54
+ selected={(selected as [Date, Date])[0] || undefined || null}
56
55
  onChange={(d) => onChange(d as [Date, Date])}
57
56
  minDate={minDate}
58
57
  maxDate={maxDate}