Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hey guys,
Is there a way I can tell a date field in a webform to allow only weekdays, NOT weekends?
Thanks,
Hey guys,
Is there a way I can tell a date field in a webform to allow only weekdays, NOT weekends?
Thanks,
Comments
Comment #1
quicksketchUnfortunately there's no built-in way to do this in Webform (3.x or 4.x). You can only set min and max dates, which could allow you to use dates like "monday" as the min and "friday" as the max, but that wouldn't work for anything beyond the current week. This might be a good new option for the module, but it would only be added to the 4.x version of the project.
However if you have a more sophisticated requirement, such as some kind of calendaring system, you might be better off just writing custom validation on your form. There's a handbook page for this sort of thing at https://drupal.org/node/1291574.
Comment #2
quicksketchClosing after lack of activity.