Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I need to set a date range from date A to date B, using a date input field with popup calendar. When the start and to are set, the dates outside of the range is grayed out, not selected but the user can still type into the input field to a date, for example, a date of last month, which is not legit for things like set an event in the future. I tried to use cck to create my own custom form with a date but still I cannot keep the user from entering a date external the start-to-to range. I may use validation (either js or php) to achieve this.
Can somebody helps me with this? Thx, hj
Comments
Comment #1
quicksketchThe user can always type whatever they want into the field, but upon submitting the form, they'll get a validation error saying their date is not within the allowed range. If that's not the case, then we have a bug. But what you've described is the intended functionality of the module.