Skip to content

Commit

Permalink
simplify date example
Browse files Browse the repository at this point in the history
  • Loading branch information
terkelg committed Mar 2, 2019
1 parent d823758 commit e841383
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions example.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ let interval;
type: 'date',
name: 'birthday',
message: `What's your birth day?`,
mask: '"Year:" YYYY, "Month:" MM, "Day:" DD \\\\\\\\||// \\Hour: HH, \\Minute: mm, "Seconds:" ss',
validate: date => date > Date.now() ? `Your birth day can't be in the future` : true
},
{
Expand All @@ -34,7 +33,7 @@ let interval;
{
type: 'confirm',
name: 'confirmed',
message: 'Can you confirm?'
message: 'Can you confirm?'
},
{
type: prev => prev && 'toggle',
Expand All @@ -46,14 +45,14 @@ let interval;
{
type: 'list',
name: 'keywords',
message: 'Enter keywords'
message: 'Enter keywords'
},
{
type: 'select',
name: 'color',
message: 'Pick a color',
choices: [
{ title: 'Red', value: '#ff0000' },
{ title: 'Red', value: '#ff0000' },
{ title: 'Green', value: '#00ff00' },
{ title: 'Yellow', value: '#ffff00', disabled: true },
{ title: 'Blue', value: '#0000ff' }
Expand Down

0 comments on commit e841383

Please sign in to comment.