ensure we convert date ranges to ymd before saving to the task-data w/ burnettk
This commit is contained in:
parent
c1e0b58c07
commit
8c9a4be4aa
|
@ -83,7 +83,8 @@ export const PROCESS_STATUSES = [
|
|||
];
|
||||
|
||||
// with time: yyyy-MM-dd HH:mm:ss
|
||||
let generalDateFormat = 'yyyy-MM-dd';
|
||||
// let generalDateFormat = 'yyyy-MM-dd';
|
||||
let generalDateFormat = 'dd-MM-yyyy';
|
||||
if (
|
||||
'spiffworkflowFrontendJsenv' in window &&
|
||||
'DATE_FORMAT' in window.spiffworkflowFrontendJsenv
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
import {
|
||||
convertDateObjectToFormattedString,
|
||||
convertStringToDate,
|
||||
dateStringToYMDFormat,
|
||||
} from '../../../helpers';
|
||||
|
||||
interface widgetArgs {
|
||||
|
@ -55,10 +56,12 @@ export default function DateRangePickerWidget({
|
|||
let dateRangeString;
|
||||
const startDate = convertDateObjectToFormattedString(dateRange[0]);
|
||||
if (startDate) {
|
||||
const startDateYMD = dateStringToYMDFormat(startDate);
|
||||
const endDate = convertDateObjectToFormattedString(dateRange[1]);
|
||||
dateRangeString = startDate;
|
||||
dateRangeString = startDateYMD;
|
||||
if (endDate) {
|
||||
dateRangeString = `${dateRangeString}${DATE_RANGE_DELIMITER}${endDate}`;
|
||||
const endDateYMD = dateStringToYMDFormat(endDate);
|
||||
dateRangeString = `${dateRangeString}${DATE_RANGE_DELIMITER}${endDateYMD}`;
|
||||
}
|
||||
}
|
||||
onChange(dateRangeString);
|
||||
|
|
Loading…
Reference in New Issue