{"_id":"hof-component-date","_rev":"63-608824b184214532df1f8521a2ee13b1","name":"hof-component-date","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"hof-component-date","version":"1.0.0","author":{"name":"UKHomeOffice"},"license":"MIT","_id":"hof-component-date@1.0.0","maintainers":[{"name":"joefitter","email":"hello@joefitter.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-component-date#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-component-date/issues"},"dist":{"shasum":"06d2cd74e9936c95cff993e579307f9372fb5739","tarball":"https://registry.npmjs.org/hof-component-date/-/hof-component-date-1.0.0.tgz","integrity":"sha512-LAz1beIQXpI0cD1UFlifvlfLwXkBbvMr57ZnHDhWS4Ke20rxMq2MkfEPZuldDAjjmv/9hIwA+RqCa3GDPg228A==","signatures":[{"sig":"MEUCIQDIdGXyGdGuO0Aoxx9PukLME4tE9Y/pntMDk01eKRJShwIgMRLUBBuXvyW8+3ReqfnuivSJk32bEyPhw4CtbsS7TGs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"06d2cd74e9936c95cff993e579307f9372fb5739","gitHead":"669184fae9951e3679193abd48d4b658997fe437","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha"},"_npmUser":{"name":"joefitter","email":"hello@joefitter.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-component-date.git","type":"git"},"_npmVersion":"3.10.10","description":"A hof middleware for rendering and processing 3 part date fields","directories":{},"_nodeVersion":"6.2.2","dependencies":{"lodash":"^4.17.4"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.14.0","reqres":"^1.2.2","sinon-chai":"^2.8.0","eslint-config-homeoffice":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hof-component-date-1.0.0.tgz_1487170705028_0.07857674034312367","host":"packages-18-east.internal.npmjs.com"}},"1.1.0":{"name":"hof-component-date","version":"1.1.0","author":{"name":"UKHomeOffice"},"license":"MIT","_id":"hof-component-date@1.1.0","maintainers":[{"name":"joefitter","email":"hello@joefitter.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-component-date#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-component-date/issues"},"dist":{"shasum":"62b056e9e02c6998ca55e905d67de7ca3102c2f5","tarball":"https://registry.npmjs.org/hof-component-date/-/hof-component-date-1.1.0.tgz","integrity":"sha512-+5J3atyDOlJlPKgoInTlyS8sorZ/MJUYJCVSJ8icol3VstWVWYMi5/DWdrMrd1cj8lMVayfeXnL/sH7jUpVzAw==","signatures":[{"sig":"MEUCIEY5ZJ15bt5omLdxsNKZVBID5Kx8x0aQ1vJy0mAeX/kYAiEA6xWi2TW6XgG8thXKrLLkxhPilnVwEMI/1TfyBpM1VSs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"62b056e9e02c6998ca55e905d67de7ca3102c2f5","gitHead":"263448bcbff54e589948038dce143dc80088c69c","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha"},"_npmUser":{"name":"joefitter","email":"hello@joefitter.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-component-date.git","type":"git"},"_npmVersion":"3.10.10","description":"A hof middleware for rendering and processing 3 part date fields","directories":{},"_nodeVersion":"6.2.2","dependencies":{"lodash":"^4.17.4"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.14.0","reqres":"^1.2.2","sinon-chai":"^2.8.0","eslint-config-homeoffice":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hof-component-date-1.1.0.tgz_1487263943096_0.6427204683423042","host":"packages-18-east.internal.npmjs.com"}},"1.1.1":{"name":"hof-component-date","version":"1.1.1","author":{"name":"UKHomeOffice"},"license":"MIT","_id":"hof-component-date@1.1.1","maintainers":[{"name":"joefitter","email":"hello@joefitter.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-component-date#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-component-date/issues"},"dist":{"shasum":"2bdda20ec24294ade331b923f993e1547b046011","tarball":"https://registry.npmjs.org/hof-component-date/-/hof-component-date-1.1.1.tgz","integrity":"sha512-Tpmhm00Y//29E42bH1cEFJTn5OjzoAgwR0S6EQglGRaLJxwPuosZhMrLHx8gXUKO5/R5LtARKDELeDVXWNJ4zQ==","signatures":[{"sig":"MEUCIEFeLU4d7gugHA200RSd1rDvgRSqDKDpfz3vHzO1Fb0tAiEA2SLGJDafXY+5H0+AcPzwWvTGdCtBL/ACPOurWZ+xp7c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"2bdda20ec24294ade331b923f993e1547b046011","gitHead":"902a76e352b425111cd07c51e4e8f9a8e00c364b","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha"},"_npmUser":{"name":"joefitter","email":"hello@joefitter.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-component-date.git","type":"git"},"_npmVersion":"3.10.10","description":"A hof middleware for rendering and processing 3 part date fields","directories":{},"_nodeVersion":"6.2.2","dependencies":{"lodash":"^4.17.4"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.14.0","reqres":"^1.2.2","sinon-chai":"^2.8.0","eslint-config-homeoffice":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hof-component-date-1.1.1.tgz_1487609538388_0.6784409831743687","host":"packages-18-east.internal.npmjs.com"}},"1.2.0":{"name":"hof-component-date","version":"1.2.0","author":{"name":"UKHomeOffice"},"license":"MIT","_id":"hof-component-date@1.2.0","maintainers":[{"name":"joefitter","email":"hello@joefitter.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-component-date#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-component-date/issues"},"dist":{"shasum":"1c4ae8df1db1e95fb30ba5c5fe96f610d48a0d1e","tarball":"https://registry.npmjs.org/hof-component-date/-/hof-component-date-1.2.0.tgz","integrity":"sha512-rbFLTzc4DyhnfxTubXglX61rAKrAV+Nq+q62IEWGVAvY0w7p7EutaZxqAtVPRYGBfn8vdeX6Cxo+7NSfkKWxyg==","signatures":[{"sig":"MEUCIQCVZdTtdy+eWAsZwgkg2df3mHOMUZ9Yyku5UBYzyhZSPgIgatwBAomAuAHRdDkTWcEl4woMq4IkfJyPxUgZCOj99bs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"1c4ae8df1db1e95fb30ba5c5fe96f610d48a0d1e","gitHead":"29f5dcacdb785fb0404e6469aa45dae3e1ff9007","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha"},"_npmUser":{"name":"joefitter","email":"hello@joefitter.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-component-date.git","type":"git"},"_npmVersion":"3.10.10","description":"A hof middleware for rendering and processing 3 part date fields","directories":{},"_nodeVersion":"6.2.2","dependencies":{"lodash":"^4.17.4"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.14.0","reqres":"^1.2.2","sinon-chai":"^2.8.0","eslint-config-homeoffice":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hof-component-date-1.2.0.tgz_1487694068493_0.9713091480080038","host":"packages-12-west.internal.npmjs.com"}},"1.3.0":{"name":"hof-component-date","version":"1.3.0","author":{"name":"UKHomeOffice"},"license":"MIT","_id":"hof-component-date@1.3.0","maintainers":[{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"joefitter","email":"hello@joefitter.com"},{"name":"josephchapman","email":"info@josephchapman.com"},{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"sulthan-ahmed","email":"sulthanahmeduk@gmail.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-component-date#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-component-date/issues"},"dist":{"shasum":"40016d32abe8f9744895d901b92774f44bdef7e7","tarball":"https://registry.npmjs.org/hof-component-date/-/hof-component-date-1.3.0.tgz","integrity":"sha512-Z94NgvMrzXL6Gh+iuAqQWeFxeVXZZbMgD4fBqVreJDIZKD4O0CbMgwXobIKBwQ+fKShyDncsPm225SMYNN45TQ==","signatures":[{"sig":"MEQCIAudkORl8PbGTkIZM/UFKuAZNN59Ea36yEf4qV3kStlbAiBNTylVDOqpgxAEgUjLi8iG4dWQC9U4M3HFNRKohq6oZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"40016d32abe8f9744895d901b92774f44bdef7e7","gitHead":"1455420fea173e68717729e7fc81cb2689e784d1","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha"},"_npmUser":{"name":"sulthan-ahmed","email":"sulthanahmeduk@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-component-date.git","type":"git"},"_npmVersion":"3.10.8","description":"A hof middleware for rendering and processing 3 part date fields","directories":{},"_nodeVersion":"6.9.1","dependencies":{"lodash":"^4.17.4"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.14.0","reqres":"^1.2.2","sinon-chai":"^2.8.0","eslint-config-homeoffice":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hof-component-date-1.3.0.tgz_1488281726690_0.9879626531619579","host":"packages-18-east.internal.npmjs.com"}},"1.3.1":{"name":"hof-component-date","version":"1.3.1","author":{"name":"UKHomeOffice"},"license":"MIT","_id":"hof-component-date@1.3.1","maintainers":[{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"joefitter","email":"hello@joefitter.com"},{"name":"josephchapman","email":"info@josephchapman.com"},{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"sulthan-ahmed","email":"sulthanahmeduk@gmail.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-component-date#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-component-date/issues"},"dist":{"shasum":"494fd2647fbccce3d18c74676c9835e38627cbe9","tarball":"https://registry.npmjs.org/hof-component-date/-/hof-component-date-1.3.1.tgz","integrity":"sha512-3UBEZlHtfXbIAIKaWb/8n2QvowiBA4FlxxZMviCzdXfl/xT6LJz4lUIYzP7knI0HN8ouSkrFMOhPgAsMpxa+CA==","signatures":[{"sig":"MEUCIFy2DrtlnIC6ybnjFF6ug6H6TpGvavcy7uJPmWAxtxUtAiEAwJVemyG4tafF5kqpRaVl7FuyDWNjJhnj3hHQi/mKRic=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"494fd2647fbccce3d18c74676c9835e38627cbe9","gitHead":"219ba2678c7d89921b842fcfc2f447a5ace8a225","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha"},"_npmUser":{"name":"joefitter","email":"hello@joefitter.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-component-date.git","type":"git"},"_npmVersion":"3.10.10","description":"A hof middleware for rendering and processing 3 part date fields","directories":{},"_nodeVersion":"6.2.2","dependencies":{"lodash":"^4.17.4"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.14.0","reqres":"^1.2.2","sinon-chai":"^2.8.0","eslint-config-homeoffice":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hof-component-date-1.3.1.tgz_1490267228887_0.24459648435004056","host":"packages-12-west.internal.npmjs.com"}},"1.4.0":{"name":"hof-component-date","version":"1.4.0","author":{"name":"UKHomeOffice"},"license":"MIT","_id":"hof-component-date@1.4.0","maintainers":[{"name":"sulthan-ahmed","email":"sulthanahmeduk@gmail.com"},{"name":"easternbloc","email":"ben@marvell-consulting.com"},{"name":"josephchapman","email":"info@josephchapman.com"},{"name":"lennym","email":"leonard.martin@gmail.com"},{"name":"joefitter","email":"hello@joefitter.com"}],"homepage":"https://github.com/UKHomeOfficeForms/hof-component-date#readme","bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-component-date/issues"},"dist":{"shasum":"ed654242b366fad85157b4b8a1ebe21fccd982f2","tarball":"https://registry.npmjs.org/hof-component-date/-/hof-component-date-1.4.0.tgz","integrity":"sha512-VfCabDiIZnpD/X2yg4JQ2ncDQ5k/LzR8HM7BKg0vkpQiu3h+zuSm4zImZLcCfFNO2UEggL3vhLJxD8Co0bG1fQ==","signatures":[{"sig":"MEYCIQC1edkUMj+k4Vwdizj4eWJXXj5SVJKyPgY6iLOVkU8/dQIhANyMZuidNWaKN+aFgeCLNqxSBqYk7FXijqU+zkis+ble","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","gitHead":"0ba7df86edfaca358b6fb35d32a81235bf711514","scripts":{"test":"npm run test:lint && npm run test:unit","test:lint":"eslint .","test:unit":"mocha"},"_npmUser":{"name":"sulthan-ahmed","email":"sulthanahmeduk@gmail.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-component-date.git","type":"git"},"_npmVersion":"5.0.1","description":"A hof middleware for rendering and processing 3 part date fields","directories":{},"_nodeVersion":"6.9.1","dependencies":{"lodash":"^4.17.4"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","sinon":"^1.17.7","eslint":"^3.14.0","reqres":"^1.2.2","sinon-chai":"^2.8.0","eslint-config-homeoffice":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hof-component-date-1.4.0.tgz_1496657808083_0.08762439549900591","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-02-15T14:58:25.640Z","modified":"2026-09-21T15:12:50.198Z","1.0.0":"2017-02-15T14:58:25.640Z","1.1.0":"2017-02-16T16:52:23.782Z","1.1.1":"2017-02-20T16:52:19.067Z","1.2.0":"2017-02-21T16:21:10.376Z","1.3.0":"2017-02-28T11:35:27.251Z","1.3.1":"2017-03-23T11:07:10.849Z","1.4.0":"2017-06-05T10:16:49.001Z"},"bugs":{"url":"https://github.com/UKHomeOfficeForms/hof-component-date/issues"},"author":{"name":"UKHomeOffice"},"license":"MIT","homepage":"https://github.com/UKHomeOfficeForms/hof-component-date#readme","repository":{"url":"git+https://github.com/UKHomeOfficeForms/hof-component-date.git","type":"git"},"description":"A hof middleware for rendering and processing 3 part date fields","maintainers":[{"email":"aaron.russell@digital.homeoffice.gov.uk","name":"aaronrussellho"},{"email":"sas-hof-test@digital.homeoffice.gov.uk","name":"hof-bot-user"},{"email":"dk4g.blob@gmail.com","name":"dk4g"},{"email":"gregory.wolverson@digital.homeoffice.gov.uk","name":"greg_wolverson_ho"},{"email":"vinodha.samiyappan@digital.homeoffice.gov.uk","name":"vinodha.s"},{"email":"megan.john@digital.homeoffice.gov.uk","name":"meganjohn"},{"email":"nese.zorba@digital.homeoffice.gov.uk","name":"nzorba"},{"email":"rayhannur.rohman@digital.homeoffice.gov.uk","name":"rayhannurrohmanho"},{"email":"vivek.kumar1@digital.homeoffice.gov.uk","name":"vivekkumar-ho"},{"email":"ben@marvell-consulting.com","name":"easternbloc"},{"email":"joseph.chapman@creatify.io","name":"josephchapman"},{"email":"leonard.martin@gmail.com","name":"lennym"},{"email":"hello@joefitter.com","name":"joefitter"},{"email":"sulthanahmeduk@gmail.com","name":"sulthan-ahmed"}],"readme":"#HOF-Component-Date\n\nA component for handling the rendering and processing of 3-input date fields used in HOF Applications.\n\n##Usage\n\nIn your fields config:\n```js\nconst dateComponent = require('hof-component-date');\n\nmodule.exports = {\n  'date-field': dateComponent('date-field', {\n    validate: ['required', 'before']\n  })\n}\n```\n\nThe above example will create a new date component with the key `'date-field'` and will apply the validators `required` and `before` (before today).\n\n##Configuration\n\nThe following optional configuration options are supported:\n\n* `validate {String|Array}` - validators to use on the processed date field\n* `template` - an absolute path to an alternate template.\n* `dayOptional {Boolean}` - day defaults to `01` if omitted. Defaults to `false`\n* `monthOptional {Boolean}` - month defaults to `01` if omitted. If true then also forces `dayOptional` to be true. Defaults to `false`\n\n##Labels\n\nThe three intermedate fields have fallback labels of Day, Month and Year, however custom labels can be used by including the translation at the following path:\n\nfields.json\n```json\n{\n  \"field-name\": {\n    \"parts\": {\n      \"day\": {\n        \"label\": \"Custom Day Label\"\n      },\n      \"month\": {\n        \"label\": \"Custom Month Label\"\n      },\n      \"year\": {\n        \"label\": \"Custom Year Label\"\n      }\n    }\n  }\n}\n```\n","readmeFilename":"README.md"}