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

datePicker: show time without seconds JS issue #4556

spauny opened this Issue Feb 18, 2019 · 1 comment


None yet
3 participants
Copy link

spauny commented Feb 18, 2019

Snippet from 0-datepicker.js, function parseTime, line 622 (Master branch)
As you can see below, if validTokenLength is 2 there will never be a tokens[2] yet tokens[2].length is always checked.

var tokens = value.split(':'),
                validTokenLength = this.options.showSeconds ? 3 : 2;

            if (tokens.length !== validTokenLength || tokens[0].length !== 2 || tokens[1].length !== 2 || tokens[2].length !== 2) {
                throw "Invalid time";

@tandraschko tandraschko added the defect label Feb 19, 2019

@mertsincan mertsincan self-assigned this Feb 25, 2019

@mertsincan mertsincan added the 6.2.17 label Feb 25, 2019

@mertsincan mertsincan added this to the 7.0 milestone Feb 25, 2019


This comment has been minimized.

Copy link

mertsincan commented Feb 25, 2019

Wrong if-condition ;) Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.