Skip to content

Update of DateTimePicker #30

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
1 commit merged into from
Nov 16, 2010
Merged

Update of DateTimePicker #30

1 commit merged into from
Nov 16, 2010

Conversation

doublerebel
Copy link
Contributor

Hello Trent,

Thanks for your hard work creating this addon for jQuery UI's Datepicker. It's been a big help in my current project and I see many uses for it. I have rewritten the Timepicker addon to keep a consistent OO-style that should make it easier to extend the Timepicker as the codebase grows. I also found some places that I was able to increase the efficiency of the code while overall shortening the filesize. I tried to keep the coding style consistent, to match the practices of the jQuery UI Codebase. Therefore I also recommend changing the filename to jquery.ui.timepicker_addon.js to match the jQuery UI naming convention.

Github had a hard time parsing all the changes from the commit, I find it's easier to compare your and my versions side-by-side. The functionality should be exactly the same (or better), but I'm sure it could use a lot more testing. Please let me know if you have any questions.

Cheers,

Charles

Changed syntax and coding style to better fit jQuery UI's practices
Reformatted line breaks, braces, and spacing for consistency
Renamed variables and functions for consistency, using _ to denote private vars/fns
Shortened variable declarations whenever possible
Improved efficiency of jQuery object calls
Now operates on jQuery collections instead of just single elements
Fixed incorrect parentheses in new _getDate fn
Various bugfixes and cleaning
JSLint-verified (braces are unnecessary for single-line statements where a semi-colon is used properly)
Provides exact same functionality but is over 2.6K smaller!
@trentrichardson
Copy link
Owner

Hey Charles,

Thanks a lot for your work. I made a few changes today to the latest version, were you able to get those as well?

Trent

@doublerebel
Copy link
Contributor Author

Hi Trent,

Yes, my code should be current with your most recent commit.

Charles

@trentrichardson
Copy link
Owner

I tested it against all of my examples and it worked fine. Thanks big time for your work! I committed it, but have not yet updated the documentation with this until it has seen some more testing.

This pull request was closed.
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