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

fix: min max validation without native input[type=time] support #273

Merged
merged 1 commit into from
Oct 19, 2020

Conversation

pixelbandito
Copy link
Contributor

This fixes issue #254

const [hours, minutes] = (timeString || ':').split(':');
const totalMinutes = parseInt(hours, 10) * 60 + parseInt(minutes, 10);
return !Number.isNaN(totalMinutes) ? totalMinutes : undefined;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleverly terse.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I experienced a surge of unexpected pride.
I don't think anyone's ever said that about me before, in any context. :)

Copy link
Contributor

@wendigolabs wendigolabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮

@pixelbandito pixelbandito merged commit 89708d3 into master Oct 19, 2020
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

Successfully merging this pull request may close these issues.

4 participants