Setting a Default Date in the Future

By: Vince Dimanno | Asked: 04/10/2023
ForumsCategory: How-toSetting a Default Date in the Future
Vince DimannoVince Dimanno asked 1 year ago
Hi All, I see in the documentation that you can set a default date in a form with this code: [date offset='+3 days']. However, I would like to have a user enter a date, but then count forward to display an expiry date. I want to show this on the form because it is inside a repeater and I only want to display the last entry.  Think of a record of renewals and I want to show the last entry of a series of repeaters. I've created a hidden field, but using this shortcode does not work: [x offset='+3 days'] where x is the value of a date chosen by the user using a datepicker.  It seems to work with the default date, but with no other date entry. Any ideas? Thanks!!
1 Answers
Victor Font answered 1 year ago
Use jQuery. See this: https://stackoverflow.com/questions/10931288/how-to-add-subtract-dates-with-javascript
Vince DimannoVince Dimanno replied 1 year ago

Thanks Victor!

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right