![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
inquirer-datepicker
Advanced tools
Datepicker plugin for Inquirer.js
inquirer.registerPrompt('datepicker', require('inquirer-datepicker'))
Inherited from inquirer, message to be displayed while retrieving response.
An array of format specifiers for printing the date to the console.
Uses the moment format options.
For example:
// 2017/09/26 22:56:36
{
type: 'datepicker',
name: 'date',
message: 'Select a date time: ',
format: ['Y', '/', 'MM', '/', 'DD', ' ', 'HH', ':', 'mm', ':', 'ss']
}
// 2017/09/26 10:56:36 PM
{
type: 'datepicker',
name: 'date',
message: 'Select a date time: ',
format: ['Y', '/', 'MM', '/', 'DD', ' ', 'hh', ':', 'mm', ':', 'ss', ' ', 'A']
}
Initial value for datepicker.
Example:
{
type: 'datepicker',
name: 'date',
message: 'Select a date time: ',
default: new Date('2017-09-28 17:36:05'),
}
These specify a range for entry. Users will be prohibited from entering a value higher or lower.
{
type: 'datepicker',
name: 'date',
message: 'Select a date time: ',
// Enter only 2017/9/1 6:00 to 2017/9/26 18:00
min: {
year: 2017,
month: 9,
day: 1,
hour: 6
},
max: {
year: 2017,
month: 9,
day: 26,
hour: 18
}
}
These specify the allowed interval (modulo), but only work when useing up and down keys.
For instance:
// Minutes can only be entered in intervals of 15 minutes
{
type: 'datepicker',
name: 'date',
message: 'Select a date time: ',
steps: {
minutes: 15
}
}
FAQs
Datepicker prompt for inquirer.js
The npm package inquirer-datepicker receives a total of 46,758 weekly downloads. As such, inquirer-datepicker popularity was classified as popular.
We found that inquirer-datepicker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.