terkelg/prompts

Feature request: add option to skip date

VityaSchel opened this issue · 1 comments

Is your feature request related to a problem?

Yes, there is no way to skip date entering

Describe the solution you'd like

I want to be able to skip date and to make it null

Describe alternatives you've considered

onRender function

Workaround for now:

{
    type: 'text',
    initial: 'YYYY-MM-DD',
    validate: text => text === 'YYYY-MM-DD' || new Date(text).toString() !== 'Invalid Date',
    format: text => text === 'YYYY-MM-DD' ? null : new Date(text),
}