浏览代码

allow optionals in the inputformat of datetime

Robin Herbots 7 年之前
父节点
当前提交
f121af7269
共有 48 个文件被更改,包括 102 次插入59 次删除
  1. 7 0
      README_date.md
  2. 1 1
      bower.json
  3. 1 1
      component.json
  4. 1 1
      composer.json
  5. 1 1
      dist/inputmask/bindings/inputmask.binding.js
  6. 1 1
      dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js
  7. 1 1
      dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js
  8. 1 1
      dist/inputmask/dependencyLibs/inputmask.dependencyLib.js
  9. 1 1
      dist/inputmask/global/document.js
  10. 1 1
      dist/inputmask/global/window.js
  11. 15 4
      dist/inputmask/inputmask.date.extensions.js
  12. 1 1
      dist/inputmask/inputmask.extensions.js
  13. 1 1
      dist/inputmask/inputmask.js
  14. 1 1
      dist/inputmask/inputmask.numeric.extensions.js
  15. 1 1
      dist/inputmask/inputmask.phone.extensions.js
  16. 1 1
      dist/inputmask/jquery.inputmask.js
  17. 1 1
      dist/inputmask/phone-codes/phone-be.js
  18. 1 1
      dist/inputmask/phone-codes/phone-ca.js
  19. 1 1
      dist/inputmask/phone-codes/phone-hu.js
  20. 1 1
      dist/inputmask/phone-codes/phone-it.js
  21. 1 1
      dist/inputmask/phone-codes/phone-mx.js
  22. 1 1
      dist/inputmask/phone-codes/phone-nl.js
  23. 1 1
      dist/inputmask/phone-codes/phone-ru.js
  24. 1 1
      dist/inputmask/phone-codes/phone.js
  25. 15 4
      dist/jquery.inputmask.bundle.js
  26. 1 1
      dist/min/inputmask/bindings/inputmask.binding.min.js
  27. 1 1
      dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.min.js
  28. 1 1
      dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.min.js
  29. 1 1
      dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.min.js
  30. 1 1
      dist/min/inputmask/global/document.min.js
  31. 1 1
      dist/min/inputmask/global/window.min.js
  32. 2 2
      dist/min/inputmask/inputmask.date.extensions.min.js
  33. 1 1
      dist/min/inputmask/inputmask.extensions.min.js
  34. 1 1
      dist/min/inputmask/inputmask.min.js
  35. 1 1
      dist/min/inputmask/inputmask.numeric.extensions.min.js
  36. 1 1
      dist/min/inputmask/inputmask.phone.extensions.min.js
  37. 1 1
      dist/min/inputmask/jquery.inputmask.min.js
  38. 1 1
      dist/min/inputmask/phone-codes/phone-be.min.js
  39. 1 1
      dist/min/inputmask/phone-codes/phone-ca.min.js
  40. 1 1
      dist/min/inputmask/phone-codes/phone-hu.min.js
  41. 1 1
      dist/min/inputmask/phone-codes/phone-it.min.js
  42. 1 1
      dist/min/inputmask/phone-codes/phone-mx.min.js
  43. 1 1
      dist/min/inputmask/phone-codes/phone-nl.min.js
  44. 1 1
      dist/min/inputmask/phone-codes/phone-ru.min.js
  45. 1 1
      dist/min/inputmask/phone-codes/phone.min.js
  46. 2 2
      dist/min/jquery.inputmask.bundle.min.js
  47. 19 5
      js/inputmask.date.extensions.js
  48. 1 1
      package.json

+ 7 - 0
README_date.md

@@ -76,6 +76,13 @@ GMT/UTC timezone offset, e.g. -0500 or +0230.
 - S  
 The date's ordinal suffix (st, nd, rd, or th). Works well with d.
 
+### Optional parts
+To mark a part of the inputFormat as optional, use the [] as you would for other masks.
+
+Ex.
+inputFormat: "dd/mm/yyyy [HH]"
+
+
 ## displayFormat
 Visual format when the input looses focus
 ## outputFormat

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "inputmask",
-  "version": "4.0.0-beta.48",
+  "version": "4.0.0-beta.49",
   "main": [
 	  "./dist/inputmask/inputmask.js",
 	  "./dist/inputmask/inputmask.extensions.js",

+ 1 - 1
component.json

@@ -2,7 +2,7 @@
 	"name": "inputmask",
 	"repository": "robinherbots/Inputmask",
 	"description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
-	"version": "4.0.0-beta.48",
+	"version": "4.0.0-beta.49",
 	"keywords": [
 		"jquery",
 		"plugins",

+ 1 - 1
composer.json

@@ -1,7 +1,7 @@
 {
   "name": "robinherbots/inputmask",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
-  "version": "4.0.0-beta.48",
+  "version": "4.0.0-beta.49",
   "type": "library",
   "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "homepage": "http://robinherbots.github.io/Inputmask",

+ 1 - 1
dist/inputmask/bindings/inputmask.binding.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/dependencyLibs/inputmask.dependencyLib.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/global/document.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 "function" == typeof define && define.amd ? define(function() {

+ 1 - 1
dist/inputmask/global/window.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 "function" == typeof define && define.amd ? define(function() {

+ 15 - 4
dist/inputmask/inputmask.date.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {
@@ -77,7 +77,18 @@
     }
     function parse(format, dateObjValue, opts) {
         for (var match, mask = ""; match = getTokenizer(opts).exec(format); ) {
-            if (void 0 === dateObjValue) mask += formatCode[match[0]] ? "(" + formatCode[match[0]][0] + ")" : Inputmask.escapeRegex(match[0]); else if (formatCode[match[0]]) mask += formatCode[match[0]][3].call(dateObjValue.date); else mask += match[0];
+            if (void 0 === dateObjValue) if (formatCode[match[0]]) mask += "(" + formatCode[match[0]][0] + ")"; else switch (match[0]) {
+              case "[":
+                mask += "(";
+                break;
+
+              case "]":
+                mask += ")?";
+                break;
+
+              default:
+                mask += Inputmask.escapeRegex(match[0]);
+            } else if (formatCode[match[0]]) mask += formatCode[match[0]][3].call(dateObjValue.date); else mask += match[0];
         }
         return mask;
     }
@@ -114,9 +125,9 @@
                 return formatCode.S = opts.i18n.ordinalSuffix.join("|"), opts.inputFormat = formatAlias[opts.inputFormat] || opts.inputFormat, 
                 opts.displayFormat = formatAlias[opts.displayFormat] || opts.displayFormat || opts.inputFormat, 
                 opts.outputFormat = formatAlias[opts.outputFormat] || opts.outputFormat || opts.inputFormat, 
-                opts.placeholder = "" !== opts.placeholder ? opts.placeholder : opts.inputFormat, 
+                opts.placeholder = "" !== opts.placeholder ? opts.placeholder : opts.inputFormat.replace(/[\[\]]/, ""), 
                 opts.min = analyseMask(opts.min, opts.inputFormat, opts), opts.max = analyseMask(opts.max, opts.inputFormat, opts), 
-                opts.regex = parse(opts.inputFormat, void 0, opts), null;
+                opts.regex = parse(opts.inputFormat, void 0, opts), console.log(opts.regex), null;
             },
             placeholder: "",
             inputFormat: "isoDateTime",

+ 1 - 1
dist/inputmask/inputmask.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/inputmask.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/inputmask.numeric.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/inputmask.phone.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/jquery.inputmask.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-be.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-ca.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-hu.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-it.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-mx.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-nl.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-ru.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(factory) {

+ 15 - 4
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(modules) {
@@ -1722,7 +1722,18 @@
         }
         function parse(format, dateObjValue, opts) {
             for (var match, mask = ""; match = getTokenizer(opts).exec(format); ) {
-                if (void 0 === dateObjValue) mask += formatCode[match[0]] ? "(" + formatCode[match[0]][0] + ")" : Inputmask.escapeRegex(match[0]); else if (formatCode[match[0]]) mask += formatCode[match[0]][3].call(dateObjValue.date); else mask += match[0];
+                if (void 0 === dateObjValue) if (formatCode[match[0]]) mask += "(" + formatCode[match[0]][0] + ")"; else switch (match[0]) {
+                  case "[":
+                    mask += "(";
+                    break;
+
+                  case "]":
+                    mask += ")?";
+                    break;
+
+                  default:
+                    mask += Inputmask.escapeRegex(match[0]);
+                } else if (formatCode[match[0]]) mask += formatCode[match[0]][3].call(dateObjValue.date); else mask += match[0];
             }
             return mask;
         }
@@ -1759,9 +1770,9 @@
                     return formatCode.S = opts.i18n.ordinalSuffix.join("|"), opts.inputFormat = formatAlias[opts.inputFormat] || opts.inputFormat, 
                     opts.displayFormat = formatAlias[opts.displayFormat] || opts.displayFormat || opts.inputFormat, 
                     opts.outputFormat = formatAlias[opts.outputFormat] || opts.outputFormat || opts.inputFormat, 
-                    opts.placeholder = "" !== opts.placeholder ? opts.placeholder : opts.inputFormat, 
+                    opts.placeholder = "" !== opts.placeholder ? opts.placeholder : opts.inputFormat.replace(/[\[\]]/, ""), 
                     opts.min = analyseMask(opts.min, opts.inputFormat, opts), opts.max = analyseMask(opts.max, opts.inputFormat, opts), 
-                    opts.regex = parse(opts.inputFormat, void 0, opts), null;
+                    opts.regex = parse(opts.inputFormat, void 0, opts), console.log(opts.regex), null;
                 },
                 placeholder: "",
                 inputFormat: "isoDateTime",

文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/bindings/inputmask.binding.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.min.js


+ 1 - 1
dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.min.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):window.dependencyLib=e(jQuery)}(function(e){return e});

文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.min.js


+ 1 - 1
dist/min/inputmask/global/document.min.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 "function"==typeof define&&define.amd?define(function(){return document}):"object"==typeof exports&&(module.exports=document);

+ 1 - 1
dist/min/inputmask/global/window.min.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.48
+* Version: 4.0.0-beta.49
 */
 
 "function"==typeof define&&define.amd?define(function(){return window}):"object"==typeof exports&&(module.exports=window);

文件差异内容过多而无法显示
+ 2 - 2
dist/min/inputmask/inputmask.date.extensions.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/inputmask.extensions.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/inputmask.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/inputmask.numeric.extensions.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/inputmask.phone.extensions.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/jquery.inputmask.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/phone-codes/phone-be.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/phone-codes/phone-ca.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/phone-codes/phone-hu.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/phone-codes/phone-it.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/phone-codes/phone-mx.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/phone-codes/phone-nl.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/phone-codes/phone-ru.min.js


文件差异内容过多而无法显示
+ 1 - 1
dist/min/inputmask/phone-codes/phone.min.js


文件差异内容过多而无法显示
+ 2 - 2
dist/min/jquery.inputmask.bundle.min.js


+ 19 - 5
js/inputmask.date.extensions.js

@@ -118,8 +118,22 @@
         //parse format to regex string
         var mask = "", match;
         while (match = getTokenizer(opts).exec(format)) {
-            if (dateObjValue === undefined)
-                mask += formatCode[match[0]] ? "(" + formatCode[match[0]][0] + ")" : Inputmask.escapeRegex(match[0]);
+            if (dateObjValue === undefined) {
+                if (formatCode[match[0]]) {
+                    mask += "(" + formatCode[match[0]][0] + ")";
+                } else {
+                    switch (match[0]) {
+                        case "[":
+                            mask += "(";
+                            break;
+                        case "]":
+                            mask += ")?";
+                            break;
+                        default:
+                            mask += Inputmask.escapeRegex(match[0]);
+                    }
+                }
+            }
             else {
                 if (formatCode[match[0]]) {
                     var getFn = formatCode[match[0]][3];
@@ -148,7 +162,7 @@
                 correctedyear = correctedyear.replace(/[^0-9]/g, "");
                 correctedyear += opts.min.year == opts.max.year ?
                     opts.min.year.substr(correctedyear.length) :
-                    (correctedyear !== "" && opts.max.year.indexOf(correctedyear) == 0 ? parseInt(opts.max.year) -1 : parseInt(opts.min.year) + 1).toString().substr(correctedyear.length);
+                    (correctedyear !== "" && opts.max.year.indexOf(correctedyear) == 0 ? parseInt(opts.max.year) - 1 : parseInt(opts.min.year) + 1).toString().substr(correctedyear.length);
             } else correctedyear = correctedyear.replace(/[^0-9]/g, "0");
             return correctedyear;
         }
@@ -189,11 +203,11 @@
                 opts.inputFormat = formatAlias[opts.inputFormat] || opts.inputFormat; //resolve possible formatAkias
                 opts.displayFormat = formatAlias[opts.displayFormat] || opts.displayFormat || opts.inputFormat; //resolve possible formatAkias
                 opts.outputFormat = formatAlias[opts.outputFormat] || opts.outputFormat || opts.inputFormat; //resolve possible formatAkias
-                opts.placeholder = opts.placeholder !== "" ? opts.placeholder : opts.inputFormat;
+                opts.placeholder = opts.placeholder !== "" ? opts.placeholder : opts.inputFormat.replace(/[\[\]]/, "");
                 opts.min = analyseMask(opts.min, opts.inputFormat, opts);
                 opts.max = analyseMask(opts.max, opts.inputFormat, opts);
                 opts.regex = parse(opts.inputFormat, undefined, opts);
-                // console.log(opts.regex);
+                console.log(opts.regex);
                 return null; //migrate to regex mask
             },
             placeholder: "", //set default as none (~ auto); when a custom placeholder is passed it will be used

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "inputmask",
-  "version": "4.0.0-beta.48",
+  "version": "4.0.0-beta.49",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
   "main": "index.js",
   "files": [