Hi,

I've just created a webform with a date field. As start year I've entered -65 and as end year -18. I also enabled popup calendar. When using this popup calender in the form it should set the 3 select fields yyyy - mm - dd. This works for mm - dd in all cases. But for yyyy it only works if one changes the yyyy field within the date popup box first. If one leaves the year within the date popup box to default (1946 in my case) only the component mm - dd are being set.

Am also using the latest .dev version of jQuery update module but disabling this module hasn't had effect. I also do not get any javascript errors.

Cheers

CommentFileSizeAuthor
#1 webform_date_default_year.patch790 bytesquicksketch

Comments

quicksketch’s picture

Priority: Normal » Minor
Status: Active » Fixed
StatusFileSize
new790 bytes

Thanks, I've confirmed this issue. The problem was that Webform defaults the date in the pop-up calendar to the current date in the event that a default value is not set in the text field. A work-around would be to set the default value for the date component to a date within the year range. Or, this patch will fix the issue just by taking the first year in the valid date-range in the event that a default is not yet set (and if "today" is not in the available date-range).

I've committed this patch to both 3.x branches.

bartezz’s picture

Cheers, will test!

4ud’s picture

Sorry for the Off-Topic:

Please, can anyone help me out with an link for an post/thread about the right 'how to' for the implementation of the popup calander in version 3.6 / D6. I found some, but I'm not sure what actual the best way is. Thank you.

bartezz’s picture

Seems to do the job Quicksketch, thanx!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.