Support

Home Forums Event Espresso Premium Date picker UK format

Date picker UK format

Posted: December 23, 2015 at 2:35 am

Viewing 9 reply threads


Matt

December 23, 2015 at 2:35 am

I know this isn’t possible yet after searching.
I just want to add that this feature would be a good addition that I would really like to see implemented.


Tony

  • Support Staff

December 23, 2015 at 7:21 am

Hi Matt,

Are you referring to the front end date-picker question or within the admin?

The front end can be changed using:

https://gist.github.com/joshfeck/e7a461c24fe75f6decaa

The admin, using the function shown here:

https://eventespresso.com/topic/localisation-of-datepicker-in-ee4/

You’ll obviously need to change the date format to whichever you prefer from those examples, I set EE to use ‘d-m-Y’ within the admin, this is the result – http://take.ms/i3J3h

Is that what you are looking for?


Matt

December 23, 2015 at 4:50 pm

I mean in the front end, for customers booking events.
I tried changing the .php as you have shown, but although the date-picker is then in the correct format, you loose the ability to change the year quickly.

You can only scroll between months, so going back from 2015 to 1980 for example takes ages!


Josh

  • Support Staff

December 23, 2015 at 5:14 pm

Hi Matt,

You can add a month/year selector to the datepicker by adding this line of JavaScript code:

changeYear: true,

The gist that Tony showed you earlier has been updated to include this addition:
https://gist.github.com/joshfeck/e7a461c24fe75f6decaa


Matt

December 23, 2015 at 5:17 pm

That worked – but only shows 2004 to 2024 dates and isn’t scrollable outside of that.


Josh

  • Support Staff

December 23, 2015 at 5:23 pm

Matt,

Would you like to set a year range with that?


Matt

December 23, 2015 at 5:25 pm

It is for a date of birth, so I need around 1930 to 2010


Josh

  • Support Staff

December 23, 2015 at 5:31 pm

You can set a year range by adding this to the line after you set the changeYear:

yearRange: "1930:2010",


Matt

December 23, 2015 at 10:35 pm

Great, thanks.


Josh

  • Support Staff

December 24, 2015 at 8:45 am

You’re welcome, Matt.

Viewing 9 reply threads

The support post ‘Date picker UK format’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso