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 doubles up entry of year #133

Closed
e107steved opened this issue Mar 2, 2013 · 15 comments
Closed

Datepicker doubles up entry of year #133

e107steved opened this issue Mar 2, 2013 · 15 comments
Labels
type: bug A problem that should not be happening
Milestone

Comments

@e107steved
Copy link

Select a date using the datetimepicker (e.g. in event calendar), and the year is entered twice:

e.g. '20132013-03-04'
or '18-03-20132013'

dependent on selected display format
(Seems to only be a problem with 100% numeric formats).
Fixed by changing line 113 of date_handler.php back to 'yy' - but then formats using words for month or day show year as 2 digits, which was the reason line 113 was changed in the first place!

Looks as if it might be a bug in the jquery code.

@CaMer0n
Copy link
Member

CaMer0n commented Mar 3, 2013

Could be related to the pref presets in the drop-down menu

CaMer0n added a commit that referenced this issue Mar 5, 2013
…ll working properly. Issue must be elsewhere.
@STR82U
Copy link
Contributor

STR82U commented Mar 5, 2013

He saw that in the calendar plugin I'm sure. Mine are doubling the year too but only in that plugin, news and other datepickers are fine.

@e107steved
Copy link
Author

Absolutely right. I've had a play as well, and can't see where the problem lies. Only clue is that 'add event' operates in userLand (which is OK) while the other instances (which appear to be wrong) are in adminLand. Operates incorrectly in mailout as well.

@CaMer0n
Copy link
Member

CaMer0n commented Mar 5, 2013

@e107steved - Here's my test code. Something very strange happening in the JS - but I haven't found any mention of it online.

https://gist.github.com/CaMer0n/5094691

@CaMer0n
Copy link
Member

CaMer0n commented Mar 5, 2013

e107_datepicker_issue

@e107steved
Copy link
Author

Definitely something to do with the difference between user and admin - I've just taken your test code, wrapped it in the two sorts of header and footer, and it misbehaves in admin mode.

@CaMer0n
Copy link
Member

CaMer0n commented Mar 5, 2013

This screenshot is from the front-end. So both must have a problem.

@e107steved
Copy link
Author

Your screenshot looks right to me. Using the latest code, this is what I get in the front end:
Front_end

..and this is what I get if I create an 'admin' page:

admin_mode

@CaMer0n
Copy link
Member

CaMer0n commented Mar 6, 2013

Interesting! Please note that on my front-end, 4 of the items return December dates instead of April.
What theme are you using on your front-end? I was using bootstrap.

@e107steved
Copy link
Author

I'd missed your December dates - I was focussing on the year display!

Here's my test code:
https://gist.github.com/e107steved/5102910
https://gist.github.com/e107steved/5102927

I got some March dates, but on the admin side.

I'm using Bootstrap, pretty much set to defaults.

Just to be clear, in my installation, line 113 of date_handler.php says:

        '%Y'    => 'yy',    // jquery-ui docs say 'yy' but yy produces '13' instead of '2013'

@STR82U
Copy link
Contributor

STR82U commented Mar 16, 2013

This was solved for all areas? Calendar and Mailout datepickers don't double up anymore; Calendar is a 4 digit year, the Mailout datepicker is a 2 digit year.

@CaMer0n
Copy link
Member

CaMer0n commented Mar 17, 2013

There are still issues.. see: uxsolutions/bootstrap-datepicker#392

@CaMer0n
Copy link
Member

CaMer0n commented Mar 18, 2013

Still as Issue? @Moc, @STR82U

@Moc
Copy link
Member

Moc commented Mar 18, 2013

I checked the banner plugin and I cannot see any issues. No more buggy behaviour as far as I can see.

@STR82U
Copy link
Contributor

STR82U commented Mar 18, 2013

Seems good here

@CaMer0n CaMer0n closed this as completed Mar 21, 2013
CaMer0n added a commit that referenced this issue May 25, 2013
…ed and should now be working with times also. eg. 7:30PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A problem that should not be happening
Projects
None yet
Development

No branches or pull requests

4 participants