Support

Home Forums Event Espresso Premium EE4 – Disable certain dates on the registration form Date Picker control?

EE4 – Disable certain dates on the registration form Date Picker control?

Posted: May 21, 2019 at 3:53 pm

Viewing 4 reply threads


mbeede@tracom.com

May 21, 2019 at 3:53 pm

Greetings – I use a Date Picker control on my registration form. But this control needs to disable/grey out all dates before the current date + 7 days. In other words users can only select dates that are at least 8 days or more in the future. I am not sure how to get the date picker control to do this – can you help?

Thanks in advance – Mark


mbeede@tracom.com

May 21, 2019 at 4:15 pm

(I forgot to include this): In case you want to see my actual page that includes this control:
Go to https://session.tracom.com/sessions/cert-1on1-social-style
Select the Register Now button (this displays the Registration form)
Go about 2/3 down the page to the “Report Date” date picker control
This is the control that I need to have modified to disable the dates.


Josh

  • Support Staff

May 22, 2019 at 10:50 am

Hi,

These types of customizations are best done by a developer because the datepicker question type in Event Espresso 4 does not have options to disable specific dates. If you do not have a PHP and/or JavaScript developer that you already work with, one of the developers from Codeable.io may be able to give you a quote.


mbeede@tracom.com

May 22, 2019 at 3:23 pm

Could you tell me this… In what source file is the datepicker control initialized before it is displayed? Is it the ee-datepicker.js file under \core\admin\assets? Or someplace else? That would be really helpful to me…

Thanks, Mark


Tony

  • Support Staff

May 23, 2019 at 10:15 am

Hi Mark,

We don’t support customizing core files so if you’re intending on customizing the above files directly we can’t help you.

I can tell you that the above file is used in the admin (\core\admin\assets is used for admin assets) not the front end. The datepicker script used on the front end is the ‘jquery-ui-datepicker’ script that is included with WordPress itself, we just enqueue it when using a datepicker question.

You can add your own JavaScript to alter the datepicker via hooks rather than editing core files, here’s an example of doing so to change the date format of the date picker using JS:

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

Viewing 4 reply threads

The support post ‘EE4 – Disable certain dates on the registration form Date Picker control?’ 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