浏览代码

enhance datetime alias for time masks

Robin Herbots 7 年之前
父节点
当前提交
b8a0535bc2
共有 49 个文件被更改,包括 105 次插入65 次删除
  1. 2 0
      CHANGELOG.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. 8 5
      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. 8 5
      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. 10 9
      js/inputmask.date.extensions.js
  48. 1 1
      package.json
  49. 31 0
      qunit/tests_date.js

+ 2 - 0
CHANGELOG.md

@@ -31,6 +31,8 @@
 - rename androidHack option to disablePredictiveText. Make it available for other platforms.
 - rename androidHack option to disablePredictiveText. Make it available for other platforms.
 
 
 ### Fixed
 ### Fixed
+- Both date and time in same masked textbox #1888
+- time input mask min and max #1674
 - Bug: Using backspace when caret is not at the end messes up static placeholders #1525
 - Bug: Using backspace when caret is not at the end messes up static placeholders #1525
 - Fast typing text #1872
 - Fast typing text #1872
 - jitMasking + disablePredictiveText causes android browser tab to stuck when clicked on "backspase" #1862
 - jitMasking + disablePredictiveText causes android browser tab to stuck when clicked on "backspase" #1862

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "inputmask",
   "name": "inputmask",
-  "version": "4.0.0-beta.62",
+  "version": "4.0.0-beta.64",
   "main": [
   "main": [
 	  "./index.js",
 	  "./index.js",
     "./css/inputmask.css"
     "./css/inputmask.css"

+ 1 - 1
component.json

@@ -2,7 +2,7 @@
 	"name": "inputmask",
 	"name": "inputmask",
 	"repository": "robinherbots/Inputmask",
 	"repository": "robinherbots/Inputmask",
 	"description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
 	"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.62",
+	"version": "4.0.0-beta.64",
 	"keywords": [
 	"keywords": [
 		"jquery",
 		"jquery",
 		"plugins",
 		"plugins",

+ 1 - 1
composer.json

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 8 - 5
dist/inputmask/inputmask.date.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.62
+* Version: 4.0.0-beta.64
 */
 */
 
 
 !function(factory) {
 !function(factory) {
@@ -109,7 +109,7 @@
             return correctedValue;
             return correctedValue;
         }
         }
         function setValue(dateObj, value, opts) {
         function setValue(dateObj, value, opts) {
-            "year" === targetProp ? (dateObj[targetProp] = extendProperty(value), dateObj["raw" + targetProp] = value) : dateObj[targetProp] = extendProperty(value), 
+            dateObj[targetProp] = extendProperty(value), dateObj["raw" + targetProp] = value, 
             void 0 !== dateOperation && dateOperation.call(dateObj.date, "month" == targetProp ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]);
             void 0 !== dateOperation && dateOperation.call(dateObj.date, "month" == targetProp ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]);
         }
         }
         if ("string" == typeof mask) {
         if ("string" == typeof mask) {
@@ -146,12 +146,15 @@
             postValidation: function(buffer, currentResult, opts) {
             postValidation: function(buffer, currentResult, opts) {
                 var result = currentResult, dateParts = analyseMask(buffer.join(""), opts.inputFormat, opts);
                 var result = currentResult, dateParts = analyseMask(buffer.join(""), opts.inputFormat, opts);
                 return result && dateParts.date.getTime() == dateParts.date.getTime() && (result = (result = function(dateParts, currentResult) {
                 return result && dateParts.date.getTime() == dateParts.date.getTime() && (result = (result = function(dateParts, currentResult) {
-                    return (!isFinite(dateParts.day) || "29" == dateParts.day && !isFinite(dateParts.rawyear) || new Date(dateParts.date.getFullYear(), isFinite(dateParts.month) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day) && currentResult;
+                    return (!isFinite(dateParts.rawday) || "29" == dateParts.day && !isFinite(dateParts.rawyear) || new Date(dateParts.date.getFullYear(), isFinite(dateParts.rawmonth) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day) && currentResult;
                 }(dateParts, result)) && function(dateParts, opts) {
                 }(dateParts, result)) && function(dateParts, opts) {
                     var result = !0;
                     var result = !0;
                     if (opts.min) {
                     if (opts.min) {
-                        var rawYear = dateParts.rawyear.replace(/[^0-9]/g, "");
-                        result = opts.min.year.substr(0, rawYear.length) <= rawYear, dateParts.year === dateParts.rawyear && opts.min.date.getTime() == opts.min.date.getTime() && (result = opts.min.date.getTime() <= dateParts.date.getTime());
+                        if (dateParts.rawyear) {
+                            var rawYear = dateParts.rawyear.replace(/[^0-9]/g, "");
+                            result = opts.min.year.substr(0, rawYear.length) <= rawYear;
+                        }
+                        dateParts.year === dateParts.rawyear && opts.min.date.getTime() == opts.min.date.getTime() && (result = opts.min.date.getTime() <= dateParts.date.getTime());
                     }
                     }
                     return result && opts.max && opts.max.date.getTime() == opts.max.date.getTime() && (result = opts.max.date.getTime() >= dateParts.date.getTime()), 
                     return result && opts.max && opts.max.date.getTime() == opts.max.date.getTime() && (result = opts.max.date.getTime() >= dateParts.date.getTime()), 
                     result;
                     result;

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

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

+ 1 - 1
dist/inputmask/inputmask.js

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 8 - 5
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.62
+* Version: 4.0.0-beta.64
 */
 */
 
 
 !function(modules) {
 !function(modules) {
@@ -1793,7 +1793,7 @@
                 return correctedValue;
                 return correctedValue;
             }
             }
             function setValue(dateObj, value, opts) {
             function setValue(dateObj, value, opts) {
-                "year" === targetProp ? (dateObj[targetProp] = extendProperty(value), dateObj["raw" + targetProp] = value) : dateObj[targetProp] = extendProperty(value), 
+                dateObj[targetProp] = extendProperty(value), dateObj["raw" + targetProp] = value, 
                 void 0 !== dateOperation && dateOperation.call(dateObj.date, "month" == targetProp ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]);
                 void 0 !== dateOperation && dateOperation.call(dateObj.date, "month" == targetProp ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]);
             }
             }
             if ("string" == typeof mask) {
             if ("string" == typeof mask) {
@@ -1830,12 +1830,15 @@
                 postValidation: function(buffer, currentResult, opts) {
                 postValidation: function(buffer, currentResult, opts) {
                     var result = currentResult, dateParts = analyseMask(buffer.join(""), opts.inputFormat, opts);
                     var result = currentResult, dateParts = analyseMask(buffer.join(""), opts.inputFormat, opts);
                     return result && dateParts.date.getTime() == dateParts.date.getTime() && (result = (result = function(dateParts, currentResult) {
                     return result && dateParts.date.getTime() == dateParts.date.getTime() && (result = (result = function(dateParts, currentResult) {
-                        return (!isFinite(dateParts.day) || "29" == dateParts.day && !isFinite(dateParts.rawyear) || new Date(dateParts.date.getFullYear(), isFinite(dateParts.month) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day) && currentResult;
+                        return (!isFinite(dateParts.rawday) || "29" == dateParts.day && !isFinite(dateParts.rawyear) || new Date(dateParts.date.getFullYear(), isFinite(dateParts.rawmonth) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day) && currentResult;
                     }(dateParts, result)) && function(dateParts, opts) {
                     }(dateParts, result)) && function(dateParts, opts) {
                         var result = !0;
                         var result = !0;
                         if (opts.min) {
                         if (opts.min) {
-                            var rawYear = dateParts.rawyear.replace(/[^0-9]/g, "");
-                            result = opts.min.year.substr(0, rawYear.length) <= rawYear, dateParts.year === dateParts.rawyear && opts.min.date.getTime() == opts.min.date.getTime() && (result = opts.min.date.getTime() <= dateParts.date.getTime());
+                            if (dateParts.rawyear) {
+                                var rawYear = dateParts.rawyear.replace(/[^0-9]/g, "");
+                                result = opts.min.year.substr(0, rawYear.length) <= rawYear;
+                            }
+                            dateParts.year === dateParts.rawyear && opts.min.date.getTime() == opts.min.date.getTime() && (result = opts.min.date.getTime() <= dateParts.date.getTime());
                         }
                         }
                         return result && opts.max && opts.max.date.getTime() == opts.max.date.getTime() && (result = opts.max.date.getTime() >= dateParts.date.getTime()), 
                         return result && opts.max && opts.max.date.getTime() == opts.max.date.getTime() && (result = opts.max.date.getTime() >= dateParts.date.getTime()), 
                         result;
                         result;

文件差异内容过多而无法显示
+ 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
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.62
+* Version: 4.0.0-beta.64
 */
 */
 
 
 !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});
 !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
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.62
+* Version: 4.0.0-beta.64
 */
 */
 
 
 "function"==typeof define&&define.amd?define(function(){return document}):"object"==typeof exports&&(module.exports=document);
 "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
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Copyright (c) 2010 - 2018 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-beta.62
+* Version: 4.0.0-beta.64
 */
 */
 
 
 "function"==typeof define&&define.amd?define(function(){return window}):"object"==typeof exports&&(module.exports=window);
 "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


+ 10 - 9
js/inputmask.date.extensions.js

@@ -95,7 +95,9 @@
         }
         }
 
 
         function isValidDate(dateParts, currentResult) {
         function isValidDate(dateParts, currentResult) {
-            return !isFinite(dateParts.day) || (dateParts.day == "29" && !isFinite(dateParts.rawyear)) || new Date(dateParts.date.getFullYear(), isFinite(dateParts.month) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day
+            return !isFinite(dateParts.rawday)
+            || (dateParts.day == "29" && !isFinite(dateParts.rawyear))
+            || new Date(dateParts.date.getFullYear(), isFinite(dateParts.rawmonth) ? dateParts.month : dateParts.date.getMonth() + 1, 0).getDate() >= dateParts.day
                 ? currentResult
                 ? currentResult
                 : false; //take corrective action if possible
                 : false; //take corrective action if possible
         }
         }
@@ -103,9 +105,11 @@
         function isDateInRange(dateParts, opts) {
         function isDateInRange(dateParts, opts) {
             var result = true;
             var result = true;
             if (opts.min) {
             if (opts.min) {
-                var rawYear = dateParts["rawyear"].replace(/[^0-9]/g, ""),
-                    minYear = opts.min.year.substr(0, rawYear.length);
-                result = minYear <= rawYear;
+                if (dateParts["rawyear"]) {
+                    var rawYear = dateParts["rawyear"].replace(/[^0-9]/g, ""),
+                        minYear = opts.min.year.substr(0, rawYear.length);
+                    result = minYear <= rawYear;
+                }
                 if (dateParts["year"] === dateParts["rawyear"]) {
                 if (dateParts["year"] === dateParts["rawyear"]) {
                     if (opts.min.date.getTime() === opts.min.date.getTime()) {
                     if (opts.min.date.getTime() === opts.min.date.getTime()) {
                         result = opts.min.date.getTime() <= dateParts.date.getTime();
                         result = opts.min.date.getTime() <= dateParts.date.getTime();
@@ -178,11 +182,8 @@
             }
             }
 
 
             function setValue(dateObj, value, opts) {
             function setValue(dateObj, value, opts) {
-                if (targetProp === "year") {
-                    dateObj[targetProp] = extendProperty(value);
-                    dateObj["raw" + targetProp] = value;
-                }
-                else dateObj[targetProp] = extendProperty(value);
+                dateObj[targetProp] = extendProperty(value);
+                dateObj["raw" + targetProp] = value;
 
 
                 if (dateOperation !== undefined)
                 if (dateOperation !== undefined)
                     dateOperation.call(dateObj.date, targetProp == "month" ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]);
                     dateOperation.call(dateObj.date, targetProp == "month" ? parseInt(dateObj[targetProp]) - 1 : dateObj[targetProp]);

+ 1 - 1
package.json

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

+ 31 - 0
qunit/tests_date.js

@@ -575,4 +575,35 @@ export default function (qunit, $, Inputmask) {
         $("#testmask").val("01011939");
         $("#testmask").val("01011939");
         assert.equal(testmask.value, "01.01.1939", "Result " + testmask.value);
         assert.equal(testmask.value, "01.01.1939", "Result " + testmask.value);
     });
     });
+
+    qunit.module("Date.Extensions - misc");
+    qunit.test("HH:MM minmax 10:00 - 11:10 enter 1059", function (assert) {
+        var $fixture = $("#qunit-fixture");
+        $fixture.append('<input type="text" id="testmask" />');
+        var testmask = document.getElementById("testmask");
+        Inputmask("datetime", {
+            inputFormat: "HH:MM",
+            min: "10:00",
+            max: "11:10"
+        }).mask(testmask);
+
+        testmask.focus();
+        $("#testmask").val("1059");
+        assert.equal(testmask.value, "10:59", "Result " + testmask.value);
+    });
+
+    qunit.test("HH:MM minmax 10:00 - 11:10 enter 1230", function (assert) {
+        var $fixture = $("#qunit-fixture");
+        $fixture.append('<input type="text" id="testmask" />');
+        var testmask = document.getElementById("testmask");
+        Inputmask("datetime", {
+            inputFormat: "HH:MM",
+            min: "10:00",
+            max: "11:10"
+        }).mask(testmask);
+
+        testmask.focus();
+        $("#testmask").val("1230");
+        assert.equal(testmask.value, "10:MM", "Result " + testmask.value);
+    });
 };
 };