Use of Date Picker inside a form

2 posts by 2 authors in: Forums > CMS Builder
Last Post: September 21, 2022   (RSS)

By daniel - September 21, 2022

Hey Andreas,

If you've created the form with Form Generator, you will probably have a section of code like this in the generated script:

    if (fg_util_isPartialDate('examination_date'))       { $_REQUEST['examination_date'] = ''; } // clear invalid dates
    else                                     { $_REQUEST['examination_date'] = sprintf("%04d-%02d-%02d %02d:%02d:%02d", @$_REQUEST['examination_date:year'], @$_REQUEST['examination_date:mon'], @$_REQUEST['examination_date:day'], 0, 00, 00); }

These lines are part of the date validation when a date field is being handled by the three dropdowns. Changing to a single input can cause some unexpected behaviour. Try commenting these lines, and let me know if that helps.

Thanks!

Daniel
Technical Lead
interactivetools.com