@instructure/ui-date-input
Advanced tools
Comparing version 5.52.2-rc.4 to 5.52.2-rc.5
@@ -390,3 +390,3 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
/** | ||
* Callback fired requesting date validation. Feedback should be provided | ||
* Callback fired when the input is blurred. Feedback should be provided | ||
* to the user when this function is called if the selected date or input | ||
@@ -393,0 +393,0 @@ * value is not valid. |
@@ -400,3 +400,3 @@ "use strict"; | ||
/** | ||
* Callback fired requesting date validation. Feedback should be provided | ||
* Callback fired when the input is blurred. Feedback should be provided | ||
* to the user when this function is called if the selected date or input | ||
@@ -403,0 +403,0 @@ * value is not valid. |
{ | ||
"name": "@instructure/ui-date-input", | ||
"version": "5.52.2-rc.4+319188cc", | ||
"version": "5.52.2-rc.5+faa04db2", | ||
"description": "A UI component library made by Instructure Inc.", | ||
@@ -23,18 +23,18 @@ "author": "Instructure, Inc. Engineering and Product Design", | ||
"devDependencies": { | ||
"@instructure/ui-babel-preset": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-test-utils": "5.52.2-rc.4+319188cc" | ||
"@instructure/ui-babel-preset": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-test-utils": "5.52.2-rc.5+faa04db2" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7", | ||
"@instructure/ui-calendar": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-forms": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-icons": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-layout": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-overlays": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-prop-types": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-selectable": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-testable": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-text-input": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-themeable": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-utils": "5.52.2-rc.4+319188cc", | ||
"@instructure/ui-calendar": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-forms": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-icons": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-layout": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-overlays": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-prop-types": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-selectable": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-testable": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-text-input": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-themeable": "5.52.2-rc.5+faa04db2", | ||
"@instructure/ui-utils": "5.52.2-rc.5+faa04db2", | ||
"prop-types": "^15" | ||
@@ -49,3 +49,3 @@ }, | ||
"sideEffects": false, | ||
"gitHead": "319188cca061dbd4c81d19e590bae63901cd0a69" | ||
"gitHead": "faa04db20b22113b9897c42c35f125d015b1e530" | ||
} |
@@ -135,3 +135,3 @@ /* | ||
/** | ||
* Callback fired requesting date validation. Feedback should be provided | ||
* Callback fired when the input is blurred. Feedback should be provided | ||
* to the user when this function is called if the selected date or input | ||
@@ -138,0 +138,0 @@ * value is not valid. |
@@ -76,19 +76,18 @@ --- | ||
handleValidateDate = (event) => { | ||
const { selectedDate, value } = this.state | ||
// We don't have a selectedDate but we have a value. That means that the value | ||
// could not be parsed and so the date is invalid | ||
if (!selectedDate && value) { | ||
this.setState({ | ||
messages: [{ type: 'error', text: 'This date is invalid' }] | ||
}) | ||
} | ||
// Display a message if the user has typed in a value that corresponds to a | ||
// disabledDate | ||
if (this.isDisabledDate(parseDate(selectedDate))) { | ||
this.setState({ | ||
messages: [{ type: 'error', text: 'This date is disabled' }] | ||
}) | ||
} | ||
this.setState(({ selectedDate, value }) => { | ||
// We don't have a selectedDate but we have a value. That means that the value | ||
// could not be parsed and so the date is invalid | ||
if (!selectedDate && value) { | ||
return { | ||
messages: [{ type: 'error', text: 'This date is invalid' }], | ||
} | ||
} | ||
// Display a message if the user has typed in a value that corresponds to a | ||
// disabledDate | ||
if (this.isDisabledDate(parseDate(selectedDate))) { | ||
return { | ||
messages: [{ type: 'error', text: 'This date is disabled' }], | ||
} | ||
} | ||
}) | ||
} | ||
@@ -95,0 +94,0 @@ |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
86680