minor fixes for frontend console errors w/ burnettk

This commit is contained in:
jasquat 2024-04-22 11:24:41 -04:00
parent 59ddc8b016
commit 44687327ae
No known key found for this signature in database
2 changed files with 4 additions and 0 deletions

View File

@ -125,6 +125,7 @@ export default function BaseInputTemplate<
placeholder={DATE_FORMAT_FOR_DISPLAY}
helperText={commonAttributes.helperText}
type="text"
labelText=""
size="md"
value={dateValue}
autocomplete="off"

View File

@ -41,6 +41,9 @@ const convertDateObjectToFormattedString = (dateObject: Date) => {
};
const dateStringToYMDFormat = (dateString: string) => {
if (dateString === undefined || dateString === null) {
return dateString;
}
if (dateString && dateString.match(/^\d{4}-\d{2}-\d{2}$/)) {
return dateString;
}