Skip to content

Commit

Permalink
[3048]: Added logic to properly handle evaluated values that are not … (
Browse files Browse the repository at this point in the history
#3109)

…strings
  • Loading branch information
geodem127 authored Jan 2, 2025
1 parent bd3beb6 commit 16671d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/shell/components/FieldTypeDate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ const parseDateInput = (input: string): Date | null => {
let [monthInput, dayInput, yearInput] = dateParts;
yearInput = yearInput?.slice(0, 4);
dayInput = dayInput?.slice(0, 2);
let month = months[monthInput.toLowerCase()?.slice(0, 3)];
let month = isNaN(+monthInput)
? months?.[monthInput?.toLowerCase()?.slice(0, 3)] ?? currentMonth
: currentMonth;

if (isNaN(month)) {
month = currentMonth;
Expand Down

0 comments on commit 16671d3

Please sign in to comment.