Skip to content

Hours parsing problem #161

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

Closed
fetis opened this issue May 24, 2011 · 3 comments
Closed

Hours parsing problem #161

fetis opened this issue May 24, 2011 · 3 comments

Comments

@fetis
Copy link

fetis commented May 24, 2011

Hi, guys

Plz add in line 429 https://github.com/trentrichardson/jQuery-Timepicker-Addon/blob/master/jquery-ui-timepicker-addon.js#L429
decimal radix, otherwise it case parsing error such value as "08a"

@trentrichardson
Copy link
Owner

Can you provide a bit more detail? Which variable needs to be parsed as a decimal? Can you give your example config or timepicker() call?

Thanks

@fetis
Copy link
Author

fetis commented May 24, 2011

i'm calling it next way
$("#txt1, #txt2, #txt3, #txt4").datetimepicker({
ampm: true,
timeFormat: "h:mm TT",
numberOfMonths: 3,
stepHour: 1,
stepMinute: 1,
hourGrid: 2,
minuteGrid: 5
});
this produces me a hours grid and one of labels has value "08a". when we click on it, it values parses here
aph = parseInt(h.substring(0,2))
and without radix 10 it treats as octal number and produces us 0 wich is incorrect.

i tested this in FF4, but I don't see reason to test it under other browsers. behavior will be same I believe

@trentrichardson
Copy link
Owner

Merged fix to dev

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

2 participants