{"id":24268362,"url":"https://github.com/derektbrown/inquirer-datepicker-prompt","last_synced_at":"2025-08-11T13:25:04.328Z","repository":{"id":22028716,"uuid":"94919556","full_name":"DerekTBrown/inquirer-datepicker-prompt","owner":"DerekTBrown","description":"Datepicker prompt for inquirer.js","archived":false,"fork":false,"pushed_at":"2022-06-08T03:01:38.000Z","size":63,"stargazers_count":27,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T13:06:24.822Z","etag":null,"topics":["cli","date","datepicker","datetime","inquirer","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DerekTBrown.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-20T17:50:25.000Z","updated_at":"2024-10-04T19:14:09.000Z","dependencies_parsed_at":"2022-07-27T02:47:39.606Z","dependency_job_id":null,"html_url":"https://github.com/DerekTBrown/inquirer-datepicker-prompt","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerekTBrown%2Finquirer-datepicker-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerekTBrown%2Finquirer-datepicker-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerekTBrown%2Finquirer-datepicker-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DerekTBrown%2Finquirer-datepicker-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DerekTBrown","download_url":"https://codeload.github.com/DerekTBrown/inquirer-datepicker-prompt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234048881,"owners_count":18771493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","date","datepicker","datetime","inquirer","nodejs"],"created_at":"2025-01-15T13:56:11.751Z","updated_at":"2025-01-15T13:56:12.350Z","avatar_url":"https://github.com/DerekTBrown.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inquirer-datepicker-prompt\nDatepicker plugin for [Inquirer.js](https://github.com/SBoudrias/Inquirer.js)\n\n![Datetime prompt](example/datetime-prompt.png)\n\n## Getting started\n__install plugin__\n```javascript\nnpm i inquirer-datepicker-prompt\n```\n\n__register prompt__\n```javascript\ninquirer.registerPrompt('datetime', require('inquirer-datepicker-prompt'))\n```\n\n## Options\n__message__\n\nInherited from inquirer, message to be displayed while retrieving response.\n\n__format__\n\nAn array of format specifiers for printing the date to the console.  Uses\na subset of the [dateformat](https://www.npmjs.com/package/dateformat) mask options.\n\nFor example:\n\n```Javascript\n// 1/1/17 5:00 PM\n{\n  type: 'datetime',\n  name: 'dt',\n  message: 'When would you like a table?',\n  format: ['m', '/', 'd', '/', 'yy', ' ', 'h', ':', 'MM', ' ', 'TT']\n}\n\n// 01/01/2017 05:00 PM\n{\n  type: 'datetime',\n  name: 'dt',\n  message: 'When would you like a table?',\n  format: ['mm', '/', 'dd', '/', 'yyyy', ' ', 'hh', ':', 'MM', ' ', 'TT']\n}\n```\n\nSupported options:\n* `d/dd/ddd/dddd`\n* `m/mm/mmm/mmmm`\n* `yy/yyyy`\n* `h/hh/H/HH`\n* `M/MM`\n* `s/ss`\n* `t/tt/T/TT`\n\n\n__initial__\n\nInitial value for datepicker, must be a Date object. If not specified current date and time will be used.\nExample:\n```javascript\n{\n  type: 'datetime',\n  name: 'dt',\n  message: 'When would you like a table?',\n  initial: new Date('2017-01-01 12:30'),\n}\n```\n\n__{date,time}.{min,max}__\n\nThese specify a range of valid dates/time for entry.  Users will be\nprohibited from entering a value higher.\n\n```Javascript\n{\n  type: 'datetime',\n  name: 'dt',\n  message: 'When would you like a table?',\n\n  // Enter only 1/1 to 3/1\n  date: {\n    min: \"1/1/2017\",\n    max: \"3/1/2017\"\n  },\n\n  // Enter only 9:00AM to 5:00PM\n  time: {\n    min: \"9:00AM\",\n    max: \"5:00PM\"\n  }\n}\n```\n\n__time.{seconds, minutes, hours}.interval__\n\nThese specify the allowed interval (modulo).  For instance:\n\n```Javascript\n\n// Minutes can only be entered in intervals of 15 minutes\n{\n  type: 'datetime',\n  name: 'dt',\n  message: 'When would you like a table?',\n  time: {\n    minutes: {\n      interval: 15\n    }\n  }\n}\n```\n\n__filter__\n\nSpecify a callback to alter the returned value:\n```Javascript\n\n{\n  type: 'datetime',\n  name: 'dt',\n  message: 'When would you like a table?',\n  time: {\n    minutes: {\n      interval: 15\n    }\n  },\n  filter: (dt) =\u003e {\n    return dt;\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderektbrown%2Finquirer-datepicker-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderektbrown%2Finquirer-datepicker-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderektbrown%2Finquirer-datepicker-prompt/lists"}