Wordpress Contact Form 7 datepicker change date format

不想你离开。 提交于 2020-12-31 05:29:48

问题


I'm using Contact Form 7 plugin in Wordpress, I would like some help in my datepicker on how to change the display date format in the front end in my form.
The default displays mm/dd/yy and I want to change it to dd/mm/yy but unfortunately I could not used this code:

dateFormat:dd/mm/yy 

it seems it was not working.
I also tried to change the code in the plugin editor of datepicker but it did not work also.

Do you have any idea? an you help me how to change the date format without installing contact form 7 datepicker because I would like to use the default datepicker that include in the contact form 7.


回答1:


You do the configuration in the shortcode.

[date date-test date-format:dd/mm/yy]



回答2:


Worked perfectly for me. Try with no spaces: date-format:dd/mm/yy

So code for me in full for the line looked like this:

<p>
   Work Start Date (<span class="required">*</span>)<br />
   [date* start-date date-format:dd/mm/yy]
</p>



回答3:


All you have to do is put:

[date your-date-from min:2017-01-01 max:2025-12-31 step:7 class:required "2017-01-01"]

Obviously put the dates you wish to use.




回答4:


I changed the display date format to dd/mm/yy in the front end (also in the generated email) of my form by using plugin Custom Datepicker NMR for Contact Form 7.

This allows you to use a new input field in your contact form called [datepicker ]

Install/activate the plugin and specify format date to show in the web browser like this:

[datepicker myFirstDatepicker id:myFirstDatepicker format:dd/mm/yy]

This plugin uses jquery-ui datepicker.



来源:https://stackoverflow.com/questions/26018682/wordpress-contact-form-7-datepicker-change-date-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!