@snapdragonsnursery/react-components 1.19.6 → 1.19.7

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": "@snapdragonsnursery/react-components",
3
- "version": "1.19.6",
3
+ "version": "1.19.7",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -290,6 +290,7 @@ export function DatePicker({
290
290
  placeholder = "Select a date",
291
291
  disabled,
292
292
  disableFuture = false,
293
+ displayFormat = "PPP",
293
294
  ...props
294
295
  }) {
295
296
  const [isOpen, setIsOpen] = useState(false);
@@ -314,7 +315,7 @@ export function DatePicker({
314
315
  >
315
316
  <CalendarIcon className="mr-2 h-4 w-4" />
316
317
  {selectedDate ? (
317
- format(selectedDate, "PPP")
318
+ format(selectedDate, displayFormat)
318
319
  ) : (
319
320
  <span>{placeholder}</span>
320
321
  )}
package/src/index.d.ts CHANGED
@@ -43,6 +43,7 @@ export interface DatePickerProps {
43
43
  placeholder?: string
44
44
  disabled?: boolean
45
45
  disableFuture?: boolean
46
+ displayFormat?: string
46
47
  }
47
48
  export const DatePicker: React.ComponentType<DatePickerProps>
48
49
  export const Calendar: React.ComponentType<any>