Date view screen | WordPress.org

[ad_1]

Hello @klingbeil

Thank you very much for using our plugin.

The date fields in our plugin use the Datepicker component of jQuery, which must be associated with an input tag. However, when you set the focus to the input tag, the plugin displays the Datepicker to select the date easily.

To separate the date components, you must emulate it yourself with separate fields:

A number field, with min 1 and max 31

A dropdown field for months.

And a number field with min 1950 and max 2030 (or preferred numbers)
Assuming they are the fields fieldname1, fieldname2, and fieldname3, respectively. You can pre-fill them with the current date by inserting an “HTML Content” field with the following piece of code as its content:


<script>
fbuilderjQuery(document).on('formReady', function(){
getField('fieldname1').setVal(DAY());
getField('fieldname2').jQueryRef().find('option:eq('+(MONTH()-1)+')').prop('selected', true);
getField('fieldname3').setVal(YEAR());
});
</script>

Best regards.

  • This reply was modified 2 minutes ago by codepeople.
  • This reply was modified 1 minute ago by codepeople.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer