Description
inquirer-datepicker-prompt is a datepicker plugin for Inquirer.js, the library for interactive prompts in Node.js command-line tools. You install the plugin and register its prompt with Inquirer, then ask the user for a date and time in the terminal. The options control the question and the answer. The message option, inherited from Inquirer, is shown while the answer is requested. The format option takes an array of specifiers for printing the date to the console, using a subset of the dateformat mask, including day, month, year, hour, minute, second and AM or PM tokens. The initial option sets the starting value, which must be a Date object, and it defaults to the current date and time. The date and time min and max options set a range, and users cannot enter a value outside it. The time seconds, minutes and hours interval options set the allowed step as a modulo. A filter callback can change the value that is returned. The README includes code examples for each option. The source is public on GitHub.…
Highlights
- Datepicker prompt for Inquirer.js
- Format specifiers for the displayed date
- Initial value as a Date object
- Date and time ranges
- Interval steps for seconds, minutes and hours
- Filter callback for the returned value
Ratings & Reviews
No ratings yet
Be the first to rate inquirer-datepicker-prompt.
People also visit
inquirer-datepicker-prompt FAQ
What is inquirer-datepicker-prompt?
A datepicker prompt plugin for Inquirer.js, used in Node.js command-line tools.
How do I install it?
The README's getting started section shows installing the plugin and registering the prompt with Inquirer.
Can I set a date range?
Yes. The date and time min and max options prevent users from entering values outside the range.
Is it free?
The source is public on GitHub and listed as open source.
What are the best inquirer-datepicker-prompt alternatives?
Popular alternatives to inquirer-datepicker-prompt include inquirer-datepicker, datepair.js and litepicker. See all inquirer-datepicker-prompt alternatives















