• Resolved Foraus IT

    (@foraus)


    Hi!

    First of all thanks for developing this plugin it has made my life so much easier!
    I just have a small issue with the datepicker, apparently by default the year selection is disabled but some users have complained that they need to click their way till random years such as 1942 .. etc..

    I’ve seen this page : https://yikesplugins.com/support/knowledge-base/customization-options-datepicker/ that explains how to fix the issues for a developer, but looks a bit involved for me.

    Is there any other way of activating the year selection within the datepicker?
    If not could you guide me a bit more on where should place that code?

    Many thanks!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @foraus,

    Sorry about the delay – I’ve been away.

    You’ll still need to use custom code but this small snippet will add a dropdown for years to the date picker.

    // Allow the Easy Forms' datepicker to change years.
    add_filter( 'yikes-mailchimp-datepicker-options', 'yikes_allow_datepicker_to_change_years', 10, 2 );
    
    function yikes_allow_datepicker_to_change_years( $datepicker_options, $form_id ) {
    	$datepicker_options['change_year'] = true;
    	return $datepicker_options;
    }

    You should note that this will only work for date fields and not birthday fields. MailChimp’s Birthday field does not allow for a year.

    Let me know if you need any help applying this code.

    Thank you,
    Kevin.

    Thread Starter Foraus IT

    (@foraus)

    That worked out, many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘DatePicker can’t select years’ is closed to new replies.