inputmask.date.extensions.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  1. /*!
  2. * inputmask.date.extensions.js
  3. * https://github.com/RobinHerbots/jquery.inputmask
  4. * Copyright (c) 2010 - 2016 Robin Herbots
  5. * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
  6. * Version: 3.3.1
  7. */
  8. !function(factory) {
  9. "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(window.dependencyLib || jQuery, window.Inputmask);
  10. }(function($, Inputmask) {
  11. return Inputmask.extendDefinitions({
  12. h: {
  13. validator: "[01][0-9]|2[0-3]",
  14. cardinality: 2,
  15. prevalidator: [ {
  16. validator: "[0-2]",
  17. cardinality: 1
  18. } ]
  19. },
  20. s: {
  21. validator: "[0-5][0-9]",
  22. cardinality: 2,
  23. prevalidator: [ {
  24. validator: "[0-5]",
  25. cardinality: 1
  26. } ]
  27. },
  28. d: {
  29. validator: "0[1-9]|[12][0-9]|3[01]",
  30. cardinality: 2,
  31. prevalidator: [ {
  32. validator: "[0-3]",
  33. cardinality: 1
  34. } ]
  35. },
  36. m: {
  37. validator: "0[1-9]|1[012]",
  38. cardinality: 2,
  39. prevalidator: [ {
  40. validator: "[01]",
  41. cardinality: 1
  42. } ]
  43. },
  44. y: {
  45. validator: "(19|20)\\d{2}",
  46. cardinality: 4,
  47. prevalidator: [ {
  48. validator: "[12]",
  49. cardinality: 1
  50. }, {
  51. validator: "(19|20)",
  52. cardinality: 2
  53. }, {
  54. validator: "(19|20)\\d",
  55. cardinality: 3
  56. } ]
  57. }
  58. }), Inputmask.extendAliases({
  59. "dd/mm/yyyy": {
  60. mask: "1/2/y",
  61. placeholder: "dd/mm/yyyy",
  62. regex: {
  63. val1pre: new RegExp("[0-3]"),
  64. val1: new RegExp("0[1-9]|[12][0-9]|3[01]"),
  65. val2pre: function(separator) {
  66. var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
  67. return new RegExp("((0[1-9]|[12][0-9]|3[01])" + escapedSeparator + "[01])");
  68. },
  69. val2: function(separator) {
  70. var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
  71. return new RegExp("((0[1-9]|[12][0-9])" + escapedSeparator + "(0[1-9]|1[012]))|(30" + escapedSeparator + "(0[13-9]|1[012]))|(31" + escapedSeparator + "(0[13578]|1[02]))");
  72. }
  73. },
  74. leapday: "29/02/",
  75. separator: "/",
  76. yearrange: {
  77. minyear: 1900,
  78. maxyear: 2099
  79. },
  80. isInYearRange: function(chrs, minyear, maxyear) {
  81. if (isNaN(chrs)) return !1;
  82. var enteredyear = parseInt(chrs.concat(minyear.toString().slice(chrs.length))), enteredyear2 = parseInt(chrs.concat(maxyear.toString().slice(chrs.length)));
  83. return (isNaN(enteredyear) ? !1 : enteredyear >= minyear && maxyear >= enteredyear) || (isNaN(enteredyear2) ? !1 : enteredyear2 >= minyear && maxyear >= enteredyear2);
  84. },
  85. determinebaseyear: function(minyear, maxyear, hint) {
  86. var currentyear = new Date().getFullYear();
  87. if (minyear > currentyear) return minyear;
  88. if (currentyear > maxyear) {
  89. for (var maxYearPrefix = maxyear.toString().slice(0, 2), maxYearPostfix = maxyear.toString().slice(2, 4); maxYearPrefix + hint > maxyear; ) maxYearPrefix--;
  90. var maxxYear = maxYearPrefix + maxYearPostfix;
  91. return minyear > maxxYear ? minyear : maxxYear;
  92. }
  93. if (currentyear >= minyear && maxyear >= currentyear) {
  94. for (var currentYearPrefix = currentyear.toString().slice(0, 2); currentYearPrefix + hint > maxyear; ) currentYearPrefix--;
  95. var currentYearAndHint = currentYearPrefix + hint;
  96. return minyear > currentYearAndHint ? minyear : currentYearAndHint;
  97. }
  98. return currentyear;
  99. },
  100. onKeyDown: function(e, buffer, caretPos, opts) {
  101. var $input = $(this);
  102. if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
  103. var today = new Date();
  104. $input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString()),
  105. $input.trigger("setvalue");
  106. }
  107. },
  108. getFrontValue: function(mask, buffer, opts) {
  109. for (var start = 0, length = 0, i = 0; i < mask.length && "2" !== mask.charAt(i); i++) {
  110. var definition = opts.definitions[mask.charAt(i)];
  111. definition ? (start += length, length = definition.cardinality) : length++;
  112. }
  113. return buffer.join("").substr(start, length);
  114. },
  115. definitions: {
  116. "1": {
  117. validator: function(chrs, maskset, pos, strict, opts) {
  118. var isValid = opts.regex.val1.test(chrs);
  119. return strict || isValid || chrs.charAt(1) !== opts.separator && -1 === "-./".indexOf(chrs.charAt(1)) || !(isValid = opts.regex.val1.test("0" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = "0",
  120. {
  121. refreshFromBuffer: {
  122. start: pos - 1,
  123. end: pos
  124. },
  125. pos: pos,
  126. c: chrs.charAt(0)
  127. });
  128. },
  129. cardinality: 2,
  130. prevalidator: [ {
  131. validator: function(chrs, maskset, pos, strict, opts) {
  132. var pchrs = chrs;
  133. isNaN(maskset.buffer[pos + 1]) || (pchrs += maskset.buffer[pos + 1]);
  134. var isValid = 1 === pchrs.length ? opts.regex.val1pre.test(pchrs) : opts.regex.val1.test(pchrs);
  135. if (!strict && !isValid) {
  136. if (isValid = opts.regex.val1.test(chrs + "0")) return maskset.buffer[pos] = chrs,
  137. maskset.buffer[++pos] = "0", {
  138. pos: pos,
  139. c: "0"
  140. };
  141. if (isValid = opts.regex.val1.test("0" + chrs)) return maskset.buffer[pos] = "0",
  142. pos++, {
  143. pos: pos
  144. };
  145. }
  146. return isValid;
  147. },
  148. cardinality: 1
  149. } ]
  150. },
  151. "2": {
  152. validator: function(chrs, maskset, pos, strict, opts) {
  153. var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);
  154. -1 !== frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator);
  155. var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);
  156. if (!strict && !isValid && (chrs.charAt(1) === opts.separator || -1 !== "-./".indexOf(chrs.charAt(1))) && (isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = "0",
  157. {
  158. refreshFromBuffer: {
  159. start: pos - 1,
  160. end: pos
  161. },
  162. pos: pos,
  163. c: chrs.charAt(0)
  164. };
  165. if (opts.mask.indexOf("2") === opts.mask.length - 1 && isValid) {
  166. var dayMonthValue = maskset.buffer.join("").substr(4, 4) + chrs;
  167. if (dayMonthValue !== opts.leapday) return !0;
  168. var year = parseInt(maskset.buffer.join("").substr(0, 4), 10);
  169. return year % 4 === 0 ? year % 100 === 0 ? year % 400 === 0 ? !0 : !1 : !0 : !1;
  170. }
  171. return isValid;
  172. },
  173. cardinality: 2,
  174. prevalidator: [ {
  175. validator: function(chrs, maskset, pos, strict, opts) {
  176. isNaN(maskset.buffer[pos + 1]) || (chrs += maskset.buffer[pos + 1]);
  177. var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);
  178. -1 !== frontValue.indexOf(opts.placeholder[0]) && (frontValue = "01" + opts.separator);
  179. var isValid = 1 === chrs.length ? opts.regex.val2pre(opts.separator).test(frontValue + chrs) : opts.regex.val2(opts.separator).test(frontValue + chrs);
  180. return strict || isValid || !(isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
  181. pos++, {
  182. pos: pos
  183. });
  184. },
  185. cardinality: 1
  186. } ]
  187. },
  188. y: {
  189. validator: function(chrs, maskset, pos, strict, opts) {
  190. if (opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) {
  191. var dayMonthValue = maskset.buffer.join("").substr(0, 6);
  192. if (dayMonthValue !== opts.leapday) return !0;
  193. var year = parseInt(chrs, 10);
  194. return year % 4 === 0 ? year % 100 === 0 ? year % 400 === 0 ? !0 : !1 : !0 : !1;
  195. }
  196. return !1;
  197. },
  198. cardinality: 4,
  199. prevalidator: [ {
  200. validator: function(chrs, maskset, pos, strict, opts) {
  201. var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
  202. if (!strict && !isValid) {
  203. var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 1);
  204. if (isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0),
  205. {
  206. pos: pos
  207. };
  208. if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + "0").toString().slice(0, 2),
  209. isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0),
  210. maskset.buffer[pos++] = yearPrefix.charAt(1), {
  211. pos: pos
  212. };
  213. }
  214. return isValid;
  215. },
  216. cardinality: 1
  217. }, {
  218. validator: function(chrs, maskset, pos, strict, opts) {
  219. var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
  220. if (!strict && !isValid) {
  221. var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2);
  222. if (isValid = opts.isInYearRange(chrs[0] + yearPrefix[1] + chrs[1], opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(1),
  223. {
  224. pos: pos
  225. };
  226. if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2),
  227. opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) {
  228. var dayMonthValue = maskset.buffer.join("").substr(0, 6);
  229. if (dayMonthValue !== opts.leapday) isValid = !0; else {
  230. var year = parseInt(chrs, 10);
  231. isValid = year % 4 === 0 ? year % 100 === 0 ? year % 400 === 0 ? !0 : !1 : !0 : !1;
  232. }
  233. } else isValid = !1;
  234. if (isValid) return maskset.buffer[pos - 1] = yearPrefix.charAt(0), maskset.buffer[pos++] = yearPrefix.charAt(1),
  235. maskset.buffer[pos++] = chrs.charAt(0), {
  236. refreshFromBuffer: {
  237. start: pos - 3,
  238. end: pos
  239. },
  240. pos: pos
  241. };
  242. }
  243. return isValid;
  244. },
  245. cardinality: 2
  246. }, {
  247. validator: function(chrs, maskset, pos, strict, opts) {
  248. return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);
  249. },
  250. cardinality: 3
  251. } ]
  252. }
  253. },
  254. insertMode: !1,
  255. autoUnmask: !1
  256. },
  257. "mm/dd/yyyy": {
  258. placeholder: "mm/dd/yyyy",
  259. alias: "dd/mm/yyyy",
  260. regex: {
  261. val2pre: function(separator) {
  262. var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
  263. return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
  264. },
  265. val2: function(separator) {
  266. var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
  267. return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
  268. },
  269. val1pre: new RegExp("[01]"),
  270. val1: new RegExp("0[1-9]|1[012]")
  271. },
  272. leapday: "02/29/",
  273. onKeyDown: function(e, buffer, caretPos, opts) {
  274. var $input = $(this);
  275. if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
  276. var today = new Date();
  277. $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()),
  278. $input.trigger("setvalue");
  279. }
  280. }
  281. },
  282. "yyyy/mm/dd": {
  283. mask: "y/1/2",
  284. placeholder: "yyyy/mm/dd",
  285. alias: "mm/dd/yyyy",
  286. leapday: "/02/29",
  287. onKeyDown: function(e, buffer, caretPos, opts) {
  288. var $input = $(this);
  289. if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
  290. var today = new Date();
  291. $input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString()),
  292. $input.trigger("setvalue");
  293. }
  294. }
  295. },
  296. "dd.mm.yyyy": {
  297. mask: "1.2.y",
  298. placeholder: "dd.mm.yyyy",
  299. leapday: "29.02.",
  300. separator: ".",
  301. alias: "dd/mm/yyyy"
  302. },
  303. "dd-mm-yyyy": {
  304. mask: "1-2-y",
  305. placeholder: "dd-mm-yyyy",
  306. leapday: "29-02-",
  307. separator: "-",
  308. alias: "dd/mm/yyyy"
  309. },
  310. "mm.dd.yyyy": {
  311. mask: "1.2.y",
  312. placeholder: "mm.dd.yyyy",
  313. leapday: "02.29.",
  314. separator: ".",
  315. alias: "mm/dd/yyyy"
  316. },
  317. "mm-dd-yyyy": {
  318. mask: "1-2-y",
  319. placeholder: "mm-dd-yyyy",
  320. leapday: "02-29-",
  321. separator: "-",
  322. alias: "mm/dd/yyyy"
  323. },
  324. "yyyy.mm.dd": {
  325. mask: "y.1.2",
  326. placeholder: "yyyy.mm.dd",
  327. leapday: ".02.29",
  328. separator: ".",
  329. alias: "yyyy/mm/dd"
  330. },
  331. "yyyy-mm-dd": {
  332. mask: "y-1-2",
  333. placeholder: "yyyy-mm-dd",
  334. leapday: "-02-29",
  335. separator: "-",
  336. alias: "yyyy/mm/dd"
  337. },
  338. datetime: {
  339. mask: "1/2/y h:s",
  340. placeholder: "dd/mm/yyyy hh:mm",
  341. alias: "dd/mm/yyyy",
  342. regex: {
  343. hrspre: new RegExp("[012]"),
  344. hrs24: new RegExp("2[0-4]|1[3-9]"),
  345. hrs: new RegExp("[01][0-9]|2[0-4]"),
  346. ampm: new RegExp("^[a|p|A|P][m|M]"),
  347. mspre: new RegExp("[0-5]"),
  348. ms: new RegExp("[0-5][0-9]")
  349. },
  350. timeseparator: ":",
  351. hourFormat: "24",
  352. definitions: {
  353. h: {
  354. validator: function(chrs, maskset, pos, strict, opts) {
  355. if ("24" === opts.hourFormat && 24 === parseInt(chrs, 10)) return maskset.buffer[pos - 1] = "0",
  356. maskset.buffer[pos] = "0", {
  357. refreshFromBuffer: {
  358. start: pos - 1,
  359. end: pos
  360. },
  361. c: "0"
  362. };
  363. var isValid = opts.regex.hrs.test(chrs);
  364. if (!strict && !isValid && (chrs.charAt(1) === opts.timeseparator || -1 !== "-.:".indexOf(chrs.charAt(1))) && (isValid = opts.regex.hrs.test("0" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = "0",
  365. maskset.buffer[pos] = chrs.charAt(0), pos++, {
  366. refreshFromBuffer: {
  367. start: pos - 2,
  368. end: pos
  369. },
  370. pos: pos,
  371. c: opts.timeseparator
  372. };
  373. if (isValid && "24" !== opts.hourFormat && opts.regex.hrs24.test(chrs)) {
  374. var tmp = parseInt(chrs, 10);
  375. return 24 === tmp ? (maskset.buffer[pos + 5] = "a", maskset.buffer[pos + 6] = "m") : (maskset.buffer[pos + 5] = "p",
  376. maskset.buffer[pos + 6] = "m"), tmp -= 12, 10 > tmp ? (maskset.buffer[pos] = tmp.toString(),
  377. maskset.buffer[pos - 1] = "0") : (maskset.buffer[pos] = tmp.toString().charAt(1),
  378. maskset.buffer[pos - 1] = tmp.toString().charAt(0)), {
  379. refreshFromBuffer: {
  380. start: pos - 1,
  381. end: pos + 6
  382. },
  383. c: maskset.buffer[pos]
  384. };
  385. }
  386. return isValid;
  387. },
  388. cardinality: 2,
  389. prevalidator: [ {
  390. validator: function(chrs, maskset, pos, strict, opts) {
  391. var isValid = opts.regex.hrspre.test(chrs);
  392. return strict || isValid || !(isValid = opts.regex.hrs.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
  393. pos++, {
  394. pos: pos
  395. });
  396. },
  397. cardinality: 1
  398. } ]
  399. },
  400. s: {
  401. validator: "[0-5][0-9]",
  402. cardinality: 2,
  403. prevalidator: [ {
  404. validator: function(chrs, maskset, pos, strict, opts) {
  405. var isValid = opts.regex.mspre.test(chrs);
  406. return strict || isValid || !(isValid = opts.regex.ms.test("0" + chrs)) ? isValid : (maskset.buffer[pos] = "0",
  407. pos++, {
  408. pos: pos
  409. });
  410. },
  411. cardinality: 1
  412. } ]
  413. },
  414. t: {
  415. validator: function(chrs, maskset, pos, strict, opts) {
  416. return opts.regex.ampm.test(chrs + "m");
  417. },
  418. casing: "lower",
  419. cardinality: 1
  420. }
  421. },
  422. insertMode: !1,
  423. autoUnmask: !1
  424. },
  425. datetime12: {
  426. mask: "1/2/y h:s t\\m",
  427. placeholder: "dd/mm/yyyy hh:mm xm",
  428. alias: "datetime",
  429. hourFormat: "12"
  430. },
  431. "mm/dd/yyyy hh:mm xm": {
  432. mask: "1/2/y h:s t\\m",
  433. placeholder: "mm/dd/yyyy hh:mm xm",
  434. alias: "datetime12",
  435. regex: {
  436. val2pre: function(separator) {
  437. var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
  438. return new RegExp("((0[13-9]|1[012])" + escapedSeparator + "[0-3])|(02" + escapedSeparator + "[0-2])");
  439. },
  440. val2: function(separator) {
  441. var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
  442. return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[13-9]|1[012])" + escapedSeparator + "30)|((0[13578]|1[02])" + escapedSeparator + "31)");
  443. },
  444. val1pre: new RegExp("[01]"),
  445. val1: new RegExp("0[1-9]|1[012]")
  446. },
  447. leapday: "02/29/",
  448. onKeyDown: function(e, buffer, caretPos, opts) {
  449. var $input = $(this);
  450. if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
  451. var today = new Date();
  452. $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()),
  453. $input.trigger("setvalue");
  454. }
  455. }
  456. },
  457. "hh:mm t": {
  458. mask: "h:s t\\m",
  459. placeholder: "hh:mm xm",
  460. alias: "datetime",
  461. hourFormat: "12"
  462. },
  463. "h:s t": {
  464. mask: "h:s t\\m",
  465. placeholder: "hh:mm xm",
  466. alias: "datetime",
  467. hourFormat: "12"
  468. },
  469. "hh:mm:ss": {
  470. mask: "h:s:s",
  471. placeholder: "hh:mm:ss",
  472. alias: "datetime",
  473. autoUnmask: !1
  474. },
  475. "hh:mm": {
  476. mask: "h:s",
  477. placeholder: "hh:mm",
  478. alias: "datetime",
  479. autoUnmask: !1
  480. },
  481. date: {
  482. alias: "dd/mm/yyyy"
  483. },
  484. "mm/yyyy": {
  485. mask: "1/y",
  486. placeholder: "mm/yyyy",
  487. leapday: "donotuse",
  488. separator: "/",
  489. alias: "mm/dd/yyyy"
  490. },
  491. shamsi: {
  492. regex: {
  493. val2pre: function(separator) {
  494. var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
  495. return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "[0-3])");
  496. },
  497. val2: function(separator) {
  498. var escapedSeparator = Inputmask.escapeRegex.call(this, separator);
  499. return new RegExp("((0[1-9]|1[012])" + escapedSeparator + "(0[1-9]|[12][0-9]))|((0[1-9]|1[012])" + escapedSeparator + "30)|((0[1-6])" + escapedSeparator + "31)");
  500. },
  501. val1pre: new RegExp("[01]"),
  502. val1: new RegExp("0[1-9]|1[012]")
  503. },
  504. yearrange: {
  505. minyear: 1300,
  506. maxyear: 1499
  507. },
  508. mask: "y/1/2",
  509. leapday: "/12/30",
  510. placeholder: "yyyy/mm/dd",
  511. alias: "mm/dd/yyyy",
  512. clearIncomplete: !0
  513. }
  514. }), Inputmask;
  515. });