You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an input element of type text and setting the option "Input type" to Date, values are stored using the default HTML date format "YYYY-MM-DD".
From what I can tell, this is the expected behavior because as far as the plugin is concerned, the date itself is just a string of text which the browser is passing in the format of "YYYY-MM-DD".
Doing some research, I found that it is not possible to change the format the browser uses to output the date value. I, however, would like to save the date using the default format from the WordPress settings.
Is this possible using some PHP code with filters and actions? If so, could you please provide an example?
To clarify further: I imagine a PHP function which would run just before the data is being saved into the database and send via email. This function could then be used to modify the form submission accordingly. In my case, the function would transform all dates info local formats.
Form submission → Function to transform data → Save to database, send email
Thank you in advance!
The text was updated successfully, but these errors were encountered:
When using an input element of type text and setting the option "Input type" to Date, values are stored using the default HTML date format
"YYYY-MM-DD"
.From what I can tell, this is the expected behavior because as far as the plugin is concerned, the date itself is just a string of text which the browser is passing in the format of
"YYYY-MM-DD"
.Doing some research, I found that it is not possible to change the format the browser uses to output the date value. I, however, would like to save the date using the default format from the WordPress settings.
Is this possible using some PHP code with filters and actions? If so, could you please provide an example?
To clarify further: I imagine a PHP function which would run just before the data is being saved into the database and send via email. This function could then be used to modify the form submission accordingly. In my case, the function would transform all dates info local formats.
Form submission
→Function to transform data
→Save to database, send email
Thank you in advance!
The text was updated successfully, but these errors were encountered: