-
Notifications
You must be signed in to change notification settings - Fork 573
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 and timepicker fixes #318
Conversation
…d of just trying strtotime directly
…tialized with its own date-format The js initializer reads data-datepicker to set each datepicker properly
…at options for the datepickers
…e characters into your date-format string
…ttribute as in date-picker)
Conflicts: includes/CMB2_Sanitize.php includes/CMB2_Types.php js/cmb2.min.js languages/cmb2-es_ES.mo languages/cmb2-es_ES.po
Conflicts: js/cmb2.min.js languages/cmb2-es_ES.mo languages/cmb2-es_ES.po
Thanks a ton for putting time in to work on this issue. To help me better review your PR, I have a few requests:
I like the edits you made (better doc-blocks, etc), but these things should be separate PRs. It's much easier to merge a PR that is simply doc-block edits than one that is changing functionality, or worse, both. Can you submit separate PRs to split these concerns and make it easier to review/merge? Thank you. |
Hi there. Will do! Sorry about those side tracked changes. Code style happened because I had my ide to auto format to wp guidelines on save and didn't realize, and the docblocks was probably me going over the code inspection notices and warnings before committing. I'll make this changes on Monday eve. Regards and have a nice weekend! — On Thu, Jul 9, 2015 at 9:07 PM, Justin Sternberg [email protected]
|
Ok thanks again! I really do like the formatting cleanup, so feel free to submit another separate PR if you're up for it. |
I think I removed all formatting changes from the PR. Regards! |
Thank you for cleaning it up, that helps a ton. Now that I can see what's going on, I see you are using |
5.2... I hope WP Core gets up to speed at some point; 5.2 has been eol for more than 4 years now... and 7 is around the corner. :P Pushed a new version that checks if create_date_from_format exists, and defines it if not. Thanks and regards! |
@yivi Why didn't you update the |
Nice work so far. I've merged your branch into trunk and created a new branch. let's collaborate on this branch instead of trunk until it's ready to go: https://github.com/WebDevStudios/CMB2/tree/yivi-date-time-picker-fixes |
Sorry for the late reply. I was out on holidays on a cycling trip, very I'll resume work this week. I'll take a look a at what's left, hopefully we Regards! 2015-07-29 18:44 GMT+02:00 Justin Sternberg [email protected]:
|
This is almost good to go. Just need to make sure that all the date type fields are accounted for in this change. |
@yivi will you be able to add support for ALL the date type fields? |
Is there any way we could add in fetching the date_format option from the user's General Settings as a default format value as well? |
Also, how does this differ from #446? |
Justin, I've tried my fixes with all these date/time fields, and they are working:
Regards 2015-10-07 17:57 GMT+02:00 Justin Sternberg [email protected]:
|
Just merged current trunk and tested it on a couple of working sites. Things look good. 2015-10-08 20:39 GMT+02:00 Yivi [email protected]:
|
Work continued in #446 |
Support for
date-format
andtime-format
in text_date and text_time fields. They accept a php formatted string, which is converted to a js formatted string and injected in the data attribute so the pickers can be initialized appropriately. Fixes #282, fixes #300