In this post we will discuss about InfoPath 2010 error "only date or date and time allowed". Also you can check out my previous posts on:
The error I got in below scenario, I have an InfoPath form and there is one text box. In that text box I need to populate today's date. So I created a formula to populate today's date. I write today(). Then I got the above error.
Even when I am trying to set default date to the date picker by using today() function, then the date appears like 2015-07-23 but it gave error message "only date or date and time allowed" like below.
This happens when your regional settings on SharePoint server is different from those on client machine in which you edit template in Infopath Designer. Infopath Designer and Filler use regional settings from local machine Windows while SharePoint server uses its own settings.
The solution is very simple. Instead of using today() write now().
Now the error will not come.