• Resolved Stonehenge Creations

    (@duisterdenhaag)


    The jQuery datepicker is currently showing 105 years (1922 – 2037).
    This range is hard-coded in events-manager.js, line 838:

    var datepicker_vals = { altFormat: "yy-mm-dd", changeMonth: true, changeYear: true, firstDay : EM.firstDay, yearRange:'c-100:c+15' };

    I think it is safe to say that at least 99% of the Events Manager users are not planning events in the past or 15 years ahead. ??

    Would it be possible to have the next update show a more realistic year range? Let’s say “-2:+5″‘.

Viewing 1 replies (of 1 total)
  • Thread Starter Stonehenge Creations

    (@duisterdenhaag)

    Never mind… ??

    Taking a closer look at the code, I noticed that the 105 year range is only used if EM.yearRange is not set.
    if( EM.yearRange ) datepicker_vals.yearRange = EM.yearRange;

    I solved it using the 'em_wp_localize_script' filter.

Viewing 1 replies (of 1 total)
  • The topic ‘Datepicker year range.’ is closed to new replies.