Title: Getting SyntaxError when I use date features
Last modified: December 27, 2021

---

# Getting SyntaxError when I use date features

 *  Resolved [scorpio](https://wordpress.org/support/users/gbassoc/)
 * (@gbassoc)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/getting-syntaxerror-when-i-use-date-features/)
 * I have a form setup with two Date fields
    1. Start Date with default set as 1(
   i.e. today plus 1) 2. End Date
 * for the End Date field value I want it to be set as Start Date plus 1
    And in
   the formula Editor for End Date I have Start Date.AddDays(1) but when I click
   validate I get “SyntaxError: Invalid or unexpected token”
 * I have tried deleting recreating the date fields but it’s just not working, I
   badly need to get this resolved

Viewing 1 replies (of 1 total)

 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/getting-syntaxerror-when-i-use-date-features/#post-15223108)
 * Hello!
 * Could you try to preview the form and check if the from throws any error message
   please?

Viewing 1 replies (of 1 total)

The topic ‘Getting SyntaxError when I use date features’ is closed to new replies.

 * ![](https://ps.w.org/smart-forms/assets/icon-256x256.jpg?rev=1226707)
 * [Smart Forms - when you need more than just a contact form](https://wordpress.org/plugins/smart-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-forms/reviews/)

## Tags

 * [syntaxerror](https://wordpress.org/support/topic-tag/syntaxerror/)

 * 1 reply
 * 2 participants
 * Last reply from: [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/getting-syntaxerror-when-i-use-date-features/#post-15223108)
 * Status: resolved