display placeholder date as lowercase only

This commit is contained in:
jasquat 2023-04-21 09:26:49 -04:00
parent 5d6ddf96b5
commit 38a9816781
3 changed files with 9 additions and 4 deletions

View File

@ -24,7 +24,11 @@ import {
FormLabel, FormLabel,
// @ts-ignore // @ts-ignore
} from '@carbon/react'; } from '@carbon/react';
import { PROCESS_STATUSES, DATE_FORMAT, DATE_FORMAT_CARBON } from '../config'; import {
PROCESS_STATUSES,
DATE_FORMAT_CARBON,
DATE_FORMAT_FOR_DISPLAY,
} from '../config';
import { import {
convertDateAndTimeStringsToSeconds, convertDateAndTimeStringsToSeconds,
convertDateObjectToFormattedHoursMinutes, convertDateObjectToFormattedHoursMinutes,
@ -681,7 +685,7 @@ export default function ProcessInstanceListTable({
<DatePicker dateFormat={DATE_FORMAT_CARBON} datePickerType="single"> <DatePicker dateFormat={DATE_FORMAT_CARBON} datePickerType="single">
<DatePickerInput <DatePickerInput
id={`date-picker-${name}`} id={`date-picker-${name}`}
placeholder={DATE_FORMAT} placeholder={DATE_FORMAT_FOR_DISPLAY}
labelText={labelString} labelText={labelString}
type="text" type="text"
size="md" size="md"

View File

@ -96,5 +96,6 @@ export const DATE_TIME_FORMAT = `${generalDateFormat} HH:mm:ss`;
export const TIME_FORMAT_HOURS_MINUTES = 'HH:mm'; export const TIME_FORMAT_HOURS_MINUTES = 'HH:mm';
export const DATE_FORMAT = generalDateFormat; export const DATE_FORMAT = generalDateFormat;
export const DATE_FORMAT_CARBON = carbonDateFormat; export const DATE_FORMAT_CARBON = carbonDateFormat;
export const DATE_FORMAT_FOR_DISPLAY = generalDateFormat.toLowerCase();
export const SPIFF_ENVIRONMENT = spiffEnvironment; export const SPIFF_ENVIRONMENT = spiffEnvironment;

View File

@ -9,7 +9,7 @@ import {
} from '@rjsf/utils'; } from '@rjsf/utils';
import { useCallback } from 'react'; import { useCallback } from 'react';
import { DATE_FORMAT, DATE_FORMAT_CARBON } from '../../../config'; import { DATE_FORMAT_CARBON, DATE_FORMAT_FOR_DISPLAY } from '../../../config';
import { ymdDateStringToConfiguredFormat } from '../../../helpers'; import { ymdDateStringToConfiguredFormat } from '../../../helpers';
/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme. /** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
@ -117,7 +117,7 @@ export default function BaseInputTemplate<
> >
<DatePickerInput <DatePickerInput
id={id} id={id}
placeholder={DATE_FORMAT} placeholder={DATE_FORMAT_FOR_DISPLAY}
helperText={helperText} helperText={helperText}
type="text" type="text"
size="md" size="md"