Title: Date Field Validation
Last modified: September 6, 2023

---

# Date Field Validation

 *  Resolved [duke78](https://wordpress.org/support/users/duke78/)
 * (@duke78)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/date-field-validation-2/)
 * When I insert a Birthday Field, the validation for the Date field doesn’t work.
 * The Dropdown for Validation also doesn’t have a Date option.
 * For example: Default value: dd.mm.yyyy
 * Now, I can insert a birthdate like this: 30.12.199012 (with 6-digits year??).
    -  This topic was modified 2 years, 8 months ago by [duke78](https://wordpress.org/support/users/duke78/).

Viewing 1 replies (of 1 total)

 *  Plugin Support [Dina S.](https://wordpress.org/support/users/themehighsupport/)
 * (@themehighsupport)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/date-field-validation-2/#post-17033601)
 * Please be informed that we are using the HTML date type field and it is the default
   behaviour of Datetime local input field.
 * Unfortunately, there is no direct option available in our plugin. However, you
   can achieve your requirement by adding the below code in your child theme’s functions.
   php file.
 *     ```wp-block-code
       add_action('wp_footer','th_script_limit_date',999);
       function th_script_limit_date(){
          ?>
          <script>
          (function($){
   
              $('input[type="datetime-local"]').attr('max', '9999-12-31T23:59')
   
          })(jQuery, window, document)
          </script>
          <?php
       }
       ```
   
 * Thank you!

Viewing 1 replies (of 1 total)

The topic ‘Date Field Validation’ is closed to new replies.

 * ![](https://ps.w.org/woo-checkout-field-editor-pro/assets/icon-256x256.gif?rev
   =3479964)
 * [Checkout Field Editor (Checkout Manager) for WooCommerce](https://wordpress.org/plugins/woo-checkout-field-editor-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-checkout-field-editor-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/reviews/)

## Tags

 * [date](https://wordpress.org/support/topic-tag/date/)

 * 1 reply
 * 2 participants
 * Last reply from: [Dina S.](https://wordpress.org/support/users/themehighsupport/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/date-field-validation-2/#post-17033601)
 * Status: resolved