Skip to content

Commit 4c4f5eb

Browse files
committed
Change a little bit of validation
1 parent ee59f4b commit 4c4f5eb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/utils/utils.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@ function convertDatesToISO (obj, dateKeys) {
218218

219219
// Helper function to check if a string is a valid date
220220
function isStringDate (value) {
221-
const date = new Date(value)
222-
return !isNaN(date.getTime())
221+
return DateTime.fromISO(value).isValid
223222
}
224223

225224
function updateDateValue (objectToUpdate, key, value) {

0 commit comments

Comments
 (0)