This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.


The calendar control validation doesn't work correctly when used in an anonymous form. When the data is typed in manually into the control and the user tabs out/clicks out of the control to another field, the calendar control displays an "invalid format" message even though the format is correct. If the user selects a date with the picker it works correctly.


This was working on 5.1 but after upgrading to K2 5.2 this does not work. Applying the latest fix pack does not resolve the issue.


This has been logged as a known bug and will be addressed in 5.3.

It appears that the AntiXSRF cookie is not set for the form in question. This may be caused by the default XSRF which is set to "false" for anonymous forms. If you set this to "true" it will be secure.

This should make the validation work as expected. This can be enabled within the web.config for both Designer and runtime.

The urls are the following:
Program Files x86 > K2 Blackpearl > Smartforms Designer > Web.config Program Files x86 > K2 Blackpearl > Smartforms Runtime > Web.config

<add key="AntiXSRF.EnabledForAnonymous" value="true" />

This is to be added to the <appSettings>.