Skip to content

Commit 352b191

Browse files
authored
Non US date parsing in the app (#1876)
1 parent 5011eb4 commit 352b191

6 files changed

Lines changed: 568 additions & 23 deletions

File tree

packages/components/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@labkey/components",
3-
"version": "6.67.2",
3+
"version": "6.67.3",
44
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
55
"sideEffects": false,
66
"files": [

packages/components/releaseNotes/components.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# @labkey/components
22
Components, models, actions, and utility functions for LabKey applications and pages
33

4+
### version 6.67.3
5+
*Released*: 1 November 2025
6+
- Issue 54160: Non US date parsing in the app
7+
- Added `getAltNonUSParseFormats` date utility function to provide alternative parse formats for common non-US date/datetime formats
8+
- Update DatePickerInput to use alternative parse formats when server date format is non-US
9+
- Update parseDate utility function to use alternative non-US parse formats
10+
411
### version 6.67.2
512
*Released* 31 October 2025
613
- Issue 53449: resolve lineage items from container path

packages/components/src/internal/components/forms/input/DatePickerInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import DatePicker from 'react-datepicker';
1919
import { FormsyInjectedProps, withFormsy } from '../formsy';
2020
import { FieldLabel } from '../FieldLabel';
2121
import {
22+
getAltParseFormats,
2223
getDateFromISO,
2324
getDateTimeDisplayValue,
2425
getJsonDateFormatString,
@@ -250,14 +251,15 @@ export class DatePickerInputImpl extends DisableableInput<DatePickerInputImplPro
250251
} = this.props;
251252
const { isDisabled, selectedDate, invalid, invalidStart } = this.state;
252253
const { dateFormat, timeFormat } = getPickerDateAndTimeFormat(queryColumn, hideTime, selectedDate);
254+
const altDateFormats = getAltParseFormats(dateFormat);
253255
const validValueInvalidStart = !invalid && invalidStart;
254256
const isTimeOnly = queryColumn.isTimeColumn;
255257
const picker = (
256258
<DatePicker
257259
autoComplete="off"
258260
autoFocus={autoFocus}
259261
className={inputClassName}
260-
dateFormat={dateFormat}
262+
dateFormat={altDateFormats.length > 1 ? altDateFormats : dateFormat}
261263
disabled={isDisabled}
262264
id={queryColumn.fieldKey}
263265
isClearable={isClearable}

0 commit comments

Comments
 (0)