Skip to content

Commit b638e13

Browse files
FIO-5910: allow manual input for w and W date formats (formio#5002)
* FIO-5910: allow manual input for w and W date formats * Update Formio.js --------- Co-authored-by: Travis Tidwell <[email protected]>
1 parent 45fda91 commit b638e13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/utils.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -803,8 +803,10 @@ export function convertFormatToMask(format) {
803803
.replace(/M{3}/g, '***')
804804
// Short month conversion if input as text.
805805
.replace(/e/g, 'Q')
806+
// Month number conversion.
807+
.replace(/W/g, '99')
806808
// Year conversion.
807-
.replace(/[ydhmsHMG]/g, '9')
809+
.replace(/[ydhmswHMG]/g, '9')
808810
// AM/PM conversion.
809811
.replace(/a/g, 'AA');
810812
}

0 commit comments

Comments
 (0)