Skip to content

Update jquery-ui-timepicker-addon.js #753

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

Merged
merged 1 commit into from
Aug 25, 2014

Conversation

ylorant
Copy link
Contributor

@ylorant ylorant commented Aug 25, 2014

Fixed a big bug on the "go to today" functionnality. When the month is not the current month, the date change didn't work, because the div ".ui-datepicker-today" was not there.

Fixed a big bug on the "go to today" functionnality. When the month is not the current month, the date change didn't work, because the div ".ui-datepicker-today" was not there.
trentrichardson added a commit that referenced this pull request Aug 25, 2014
Update jquery-ui-timepicker-addon.js - fixes "go to today" functionality when not the current month date change doesn't work since ".ui-datepicker-today" class was not there.
@trentrichardson trentrichardson merged commit 9cfc82b into trentrichardson:dev Aug 25, 2014
@trentrichardson
Copy link
Owner

Thank you for the fix. I will be testing dev and merge when all seems stable.

@trentrichardson
Copy link
Owner

@ylorant Can you describe your exact issue or provide an example?

When I visit the docs on the live documentation page and go to examples, there is an example under Alt fields with an old date in a previous month pre populated. I open the picker, click Now and everything works as expected.

http://trentrichardson.com/examples/timepicker/

With the dev version using the these changes the Now button works, but it immediately closes the picker and leaves focus on the input. Which means I have to click off the input to blur, and refocus to reopen the datepicker.

Can you help clarify your issue and fix?

@ylorant
Copy link
Contributor Author

ylorant commented Aug 29, 2014

Yeah, the problem was when the input was already modified at the page load (let's say, you're editing you're birthday on your profile page). When the month selected is different from the current month, the selection of today's date didn't work, because the block representing the current date didn't exist. The fix now, instead of simulating a click on the current date, does a proper setDate() to the current day.

@ylorant ylorant deleted the dev branch April 13, 2015 00:19
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.

2 participants