pixelize-design-library 1.1.81 → 1.1.82

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.
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import "react-datepicker/dist/react-datepicker.css";
3
3
  import { DatePickerProps } from "./DatePickerProps";
4
- export default function DatePicker({ selectedDate, onChange, placeholderText, dateFormat, showTimeSelect, timeFormat, timeIntervals, timeCaption, dateTimeFormat, id, name, label, isRequired, isInformation, informationMessage, error, errorMessage, helperText, }: DatePickerProps): React.JSX.Element;
4
+ export default function DatePicker({ selectedDate, onChange, placeholderText, dateFormat, showTimeSelect, timeFormat, timeIntervals, timeCaption, dateTimeFormat, id, name, label, isRequired, isInformation, informationMessage, error, errorMessage, helperText, minDate, maxDate, }: DatePickerProps): React.JSX.Element;
@@ -23,12 +23,12 @@ var DatePickerContainer = styled_1.default.div(templateObject_1 || (templateObje
23
23
  // font-weight: bold;
24
24
  // `;
25
25
  function DatePicker(_a) {
26
- var selectedDate = _a.selectedDate, onChange = _a.onChange, _b = _a.placeholderText, placeholderText = _b === void 0 ? "Select a date" : _b, _c = _a.dateFormat, dateFormat = _c === void 0 ? "MM/dd/yyyy" : _c, _d = _a.showTimeSelect, showTimeSelect = _d === void 0 ? false : _d, _e = _a.timeFormat, timeFormat = _e === void 0 ? "HH:mm aa" : _e, _f = _a.timeIntervals, timeIntervals = _f === void 0 ? 30 : _f, _g = _a.timeCaption, timeCaption = _g === void 0 ? "Time" : _g, dateTimeFormat = _a.dateTimeFormat, id = _a.id, name = _a.name, label = _a.label, _h = _a.isRequired, isRequired = _h === void 0 ? false : _h, _j = _a.isInformation, isInformation = _j === void 0 ? false : _j, _k = _a.informationMessage, informationMessage = _k === void 0 ? "" : _k, _l = _a.error, error = _l === void 0 ? false : _l, _m = _a.errorMessage, errorMessage = _m === void 0 ? "" : _m, _o = _a.helperText, helperText = _o === void 0 ? "" : _o;
26
+ var selectedDate = _a.selectedDate, onChange = _a.onChange, _b = _a.placeholderText, placeholderText = _b === void 0 ? "Select a date" : _b, _c = _a.dateFormat, dateFormat = _c === void 0 ? "MM/dd/yyyy" : _c, _d = _a.showTimeSelect, showTimeSelect = _d === void 0 ? false : _d, _e = _a.timeFormat, timeFormat = _e === void 0 ? "HH:mm aa" : _e, _f = _a.timeIntervals, timeIntervals = _f === void 0 ? 30 : _f, _g = _a.timeCaption, timeCaption = _g === void 0 ? "Time" : _g, dateTimeFormat = _a.dateTimeFormat, id = _a.id, name = _a.name, label = _a.label, _h = _a.isRequired, isRequired = _h === void 0 ? false : _h, _j = _a.isInformation, isInformation = _j === void 0 ? false : _j, _k = _a.informationMessage, informationMessage = _k === void 0 ? "" : _k, _l = _a.error, error = _l === void 0 ? false : _l, _m = _a.errorMessage, errorMessage = _m === void 0 ? "" : _m, _o = _a.helperText, helperText = _o === void 0 ? "" : _o, minDate = _a.minDate, maxDate = _a.maxDate;
27
27
  var theme = (0, useCustomTheme_1.useCustomTheme)();
28
28
  return (react_1.default.createElement(react_2.FormControl, { isInvalid: error },
29
29
  label && (react_1.default.createElement(FormLabel_1.TextLabel, { label: label, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })),
30
30
  react_1.default.createElement(DatePickerContainer, null,
31
- react_1.default.createElement(react_datepicker_1.default, { selected: selectedDate, onChange: onChange, placeholderText: placeholderText, dateFormat: showTimeSelect
31
+ react_1.default.createElement(react_datepicker_1.default, { minDate: minDate, maxDate: maxDate, selected: selectedDate, onChange: onChange, placeholderText: placeholderText, dateFormat: showTimeSelect
32
32
  ? dateTimeFormat
33
33
  ? dateTimeFormat
34
34
  : "MM/dd/yyyy h:mm aa"
@@ -20,5 +20,7 @@ export type DatePickerProps = {
20
20
  error?: boolean;
21
21
  errorMessage?: string;
22
22
  helperText?: string;
23
+ minDate?: Date;
24
+ maxDate?: Date;
23
25
  } & Partial<ReactDatePickerProps>;
24
26
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "1.1.81",
3
+ "version": "1.1.82",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",