gbs-add-block 0.0.36 → 0.0.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # GBS Building Blocks 2.0 (v0.0.36)
1
+ # GBS Building Blocks 2.0 (v0.0.37)
2
2
 
3
3
  Latest and upgraded version of GBS building blocks with headless UI and removed dependencies.
4
4
 
@@ -6,10 +6,11 @@ Latest and upgraded version of GBS building blocks with headless UI and removed
6
6
 
7
7
  For detailed documentation on usage and props, Please visit: [Building Block Documentation v2.0](https://blackmax-designs.gitbook.io/building-block-v2.0)
8
8
 
9
- ## What's New 🎉 (Ver 0.0.36)
9
+ ## What's New 🎉 (Ver 0.0.37)
10
10
 
11
11
  - Updated Form Renderer with form builder and AI support
12
12
  - Updated Grid
13
+ - Updated DatePicker
13
14
 
14
15
  ## Authors
15
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gbs-add-block",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "description": "React Component Library",
5
5
  "files": [
6
6
  "index.js",
@@ -12,7 +12,6 @@ import { calender, down, leftArrows, rightArrows } from "../icon/iconPaths";
12
12
  import type { DatePickerProps } from "./types";
13
13
 
14
14
  export const DatePicker = ({
15
- placeholder = undefined,
16
15
  selectedDateValue,
17
16
  minDate = null,
18
17
  maxDate = null,
@@ -29,9 +28,6 @@ export const DatePicker = ({
29
28
  selectedDateValue ? selectedDateValue : new Date()
30
29
  );
31
30
  const [hasMounted, setHasMounted] = useState(false);
32
- const [showPlaceHolder, setShowPlaceHolder] = useState<string | undefined>(
33
- selectedDateValue ? undefined : placeholder
34
- );
35
31
 
36
32
  const dateRef = useRef<HTMLDivElement>(null);
37
33
  const today = new Date();
@@ -82,7 +78,6 @@ export const DatePicker = ({
82
78
 
83
79
  const selectDate = (date: any) => {
84
80
  setSelectedDate(date);
85
- setShowPlaceHolder(undefined);
86
81
  setShowDatepicker(false);
87
82
  if (onDateChange) onDateChange(date);
88
83
  };
@@ -135,8 +130,7 @@ export const DatePicker = ({
135
130
  elements={calender}
136
131
  svgClass={"stroke-gray-500 fill-none dark:stroke-white"}
137
132
  />
138
-
139
- {showPlaceHolder ? showPlaceHolder : selectedDate.toLocaleDateString()}
133
+ {selectedDate.toLocaleDateString()}
140
134
  </button>
141
135
 
142
136
  {showDatepicker && (