fix(64164): Prevent default date parsing#2
Merged
EtienneLeco merged 3 commits into360l-fixesfrom Mar 19, 2026
Merged
Conversation
I dont want to deal with jest config
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Secrets | View in Orca |
EtienneLeco
commented
Mar 19, 2026
|
|
||
| parse(dateString, mask) { | ||
| const masks = this.normalizeMasks(mask); | ||
| return ( |
Author
There was a problem hiding this comment.
[reviewers] Hide whitespace
arslane-boukrif
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: https://github.com/360Learning/platform/issues/64164
Context
v-calendar is a lib we use for our datePicker components. It is not well maintained and we had to create a fork from the official lib.
v-calendar contains some logic to parse a string as a date against a language and a format.
In case the string does not match any format. A last try is done with
new Date(<dateAsString>). As this logic introduces a bug, this PR removes this part of the logic.The bug
in french
12/24/2024does not match formatDD/MM/YYYY(because 24 cannot be a valid month) so we should expect an error of parsing. Instead we get December 24th 2024 (because ofnew Date("12/24/2024"))Changes