@instructure/ui-date-input 9.3.1-snapshot-3 → 9.3.1-snapshot-5
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/CHANGELOG.md +5 -2
- package/es/DateInput2/index.js +8 -5
- package/es/DateInput2/props.js +1 -0
- package/lib/DateInput2/index.js +8 -5
- package/lib/DateInput2/props.js +1 -0
- package/package.json +20 -20
- package/src/DateInput2/README.md +54 -3
- package/src/DateInput2/index.tsx +18 -23
- package/src/DateInput2/props.ts +13 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/DateInput2/index.d.ts +1 -1
- package/types/DateInput2/index.d.ts.map +1 -1
- package/types/DateInput2/props.d.ts +9 -1
- package/types/DateInput2/props.d.ts.map +1 -1
@@ -6,7 +6,7 @@ category: components
|
|
6
6
|
---
|
7
7
|
**/
|
8
8
|
declare const DateInput2: {
|
9
|
-
({ renderLabel, screenReaderLabels, isRequired, interaction, size, isInline, value, messages, width, onChange, onBlur, withYearPicker, invalidDateErrorMessage, locale, timezone, placeholder, ...rest }: DateInput2Props): jsx.JSX.Element;
|
9
|
+
({ renderLabel, screenReaderLabels, isRequired, interaction, size, isInline, value, messages, width, onChange, onBlur, withYearPicker, onRequestValidateDate, invalidDateErrorMessage, locale, timezone, placeholder, ...rest }: DateInput2Props): jsx.JSX.Element;
|
10
10
|
propTypes: import("@instructure/shared-types").PropValidators<keyof DateInput2Props>;
|
11
11
|
};
|
12
12
|
export default DateInput2;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DateInput2/index.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAG1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DateInput2/index.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAG1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAuB9C;;;;GAIG;AACH,QAAA,MAAM,UAAU;qOAmBb,eAAe;;CAmKjB,CAAA;AAID,eAAe,UAAU,CAAA;AACzB,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
@@ -70,7 +70,15 @@ type DateInput2Props = {
|
|
70
70
|
*/
|
71
71
|
onRequestHideCalendar?: (event: SyntheticEvent) => void;
|
72
72
|
/**
|
73
|
-
*
|
73
|
+
* Callback fired when the input is blurred. Feedback should be provided
|
74
|
+
* to the user when this function is called if the selected date or input
|
75
|
+
* value is invalid. The component has an internal check whether the date can
|
76
|
+
* be parsed to a valid date.
|
77
|
+
*/
|
78
|
+
onRequestValidateDate?: (value?: string, internalValidationPassed?: boolean) => void | FormMessage[];
|
79
|
+
/**
|
80
|
+
* The message shown to the user when the date is invalid. If this prop is not set, validation is bypassed.
|
81
|
+
* If it's set to an empty string, validation happens and the input border changes to red if validation hasn't passed.
|
74
82
|
**/
|
75
83
|
invalidDateErrorMessage?: string;
|
76
84
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/DateInput2/props.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAI3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAE3E,KAAK,eAAe,GAAG;IACrB;;OAEG;IACH,WAAW,EAAE,UAAU,CAAA;IACvB,kBAAkB,EAAE;QAClB,YAAY,EAAE,MAAM,CAAA;QACpB,eAAe,EAAE,MAAM,CAAA;QACvB,eAAe,EAAE,MAAM,CAAA;KACxB,CAAA;IACD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd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