Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time type #241

Closed
jcdietrich opened this issue Nov 20, 2019 · 1 comment
Closed

time type #241

jcdietrich opened this issue Nov 20, 2019 · 1 comment

Comments

@jcdietrich
Copy link

The date type is pretty neat, and works well.

I would like to see a 'time' (specifically for my use case a duration) type that would prompt for just hours:min:sec

@jcdietrich
Copy link
Author

jcdietrich commented Nov 20, 2019

Can get a duration using something like this....

  {
        type: 'date',
        name: 'fulltime',
        message: 'time to take?',
        initial: new Date(1974,9,12),
        mask: 'H:mm:ss',
        format: value => {
            const returnValue = [value.getHours(), value.getMinutes(), value.getSeconds()];
            return returnValue;
        },
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant