Changing date format

Last updated: January 21, 2021 Written by: Avatar Teresa
share
Table of contents
share
Table of contents

You can change the date format in your landing page form. Depending on the date format used in different countries, you can customize form field to create your own Date field, supporting i.e the format: MM/DD/YEAR

How to change the date format

1. Go to the editor of your landing page and then click on Edit a form.

edit_form1

2. Find your current Date field and delete it.

date_field

3. Then add a new simple input field with attribute name date.

date_field_settings

4. Find Settings in the right top corner of the editor and add custom CSS style below:

@import url("/js/libs/bootstrap-datepicker/dist/css/bootstrap-datepicker.standalone.min.css")
add_css1

5. Publish your landing page and click on Go to campaign.

publish1
gotocampaign

6. Choose JavaScript code tab on the landing page dashboard and add a new script.

javascriptcode

7. Copy the script below and add it as a new script to the main page on body bottom position.

<script type="text/javascript" src="/js/libs/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script> <script type="text/javascript" src="/js/libs/bootstrap-datepicker/dist/locales/bootstrap-datepicker.en.min.js"></script>  <script type="text/javascript">   (function ($) {      $('[name="date"]').datepicker({        autoclose: true,        clearBtn: true,        format: 'mm/dd/yyyy',        language: 'en',        todayBtn: 'linked',        todayHighlight: true      });   })(jQuery); </script>
date_field_code

8. Check your landing page online – the date format should display in the new order.

date_form
share

Was this manual helpful?