我买了一个日历插件 ,他支持cpf
于是我为文章建立了出行日期和返程日期两个选项,经过测试的我发现acf可以很好的工作
但是toolset 默认的日期格式 该日期插件却无法识别, 所以 我能否修改默认的toolset 日期格式
我知道用短代码可以很好的解决输出形式,但是这不是我想要的,我只想把默认的日期格式变为d.m.y 这种形式
Hello and thank you for contacting the Toolset support.
I used Google Translate to read your message in English, and I am not sure to fully understand. Are you using the ACF plugin too?
https://wordpress.org/plugins/advanced-custom-fields/
It is worth to mention that Toolset saves Date fields as a number, a Unix timestamp hidden link
Then, it uses the default WordPress format for displaying the dates. The WordPress format can be customized in Settings->General https://wordpress.org/support/article/formatting-date-and-time/
I'll suggest that you check, at the database level, how the calendar plugin is storing the dates. Or you can reach to the plugin's support and ask them how the date is saved. They may also help on how to display it in a different format.
I'll remain at your disposal.
first i wish you have a wonderful christmas
thanks for your help
and another question is it possible output the weekend day after set the date picker fileds?
such as when i pick up 2020.12.25 the frontend will show its 2020.12.25 friday ?
If I understood well, you want to display the day, not the weekend, right?
The day can be displayed with the "l" format character. Read more about the possible format characters in WordPress or PHP documentation pages:
- https://wordpress.org/support/article/formatting-date-and-time/
- https://wordpress.org/support/article/formatting-date-and-time/
So to display "2020.12.25 friday" you need to use the format "d.m.Y l":
- d: Day of the month, 2 digits with leading zeros
- m: Numeric representation of a month, with leading zeros
- Y: A full numeric representation of a year, 4 digits
- l (Lowercase L): A full textual representation of the day of the week
However, for support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have to kindly ask you to open a new thread if you have more questions.