Skip to content

Commit

Permalink
Fixed #337 - Inputmask - Include the unmaskAsNumber property into a c…
Browse files Browse the repository at this point in the history
…ustom widget's definition
  • Loading branch information
tsv2013 committed Dec 18, 2023
1 parent dff1215 commit 3ac9ff0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/inputmask.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function init(Survey) {
autoUnmask: true,
clearIncomplete: true,
showMaskOnHover: true,
unmaskAsNumber: true,
widgetIsLoaded: function () {
return typeof Inputmask != "undefined";
},
Expand Down Expand Up @@ -84,6 +85,12 @@ function init(Survey) {
category: "general",
visible: false,
},
{
name: "unmaskAsNumber:boolean",
category: "general",
visible: false,
default: true,
},
{
name: "prefix",
category: "general",
Expand Down Expand Up @@ -128,6 +135,9 @@ function init(Survey) {
options.showMaskOnHover = typeof surveyElement.showMaskOnHover !== "undefined"
? surveyElement.showMaskOnHover
: rootWidget.showMaskOnHover;
options.unmaskAsNumber = typeof surveyElement.unmaskAsNumber !== "undefined"
? surveyElement.unmaskAsNumber
: rootWidget.unmaskAsNumber;
if (surveyElement.inputMask !== "none") {
options.inputFormat = surveyElement.inputFormat;
}
Expand Down

0 comments on commit 3ac9ff0

Please sign in to comment.