in Infopath i set the default value of a due date field to "today()". the format however when i load the form shows "Year-Mo-Day" format (however is correct data), and it displays a red box around the field with ""Only Date or Date and Time Allowed". If i just select the right date from the date picker it works fine. Also, i did set the Format of the Date field to be "03-12-2013" format.
-
i found this but i don't understand why Infopath would give you a Date math function that improperly formats for a Date field. theyhttp://nabeeldotnet.blogspot.com/2011/11/infopath-2010-date-picker-problem-when.html– April DrakeCommented Apr 11, 2013 at 0:55
-
or the same InfoPath 2010 - Date Picker problem when SetVal from CodeBehind in more human-friendly format– Gennady Vanin Геннадий ВанинCommented Apr 11, 2013 at 4:08
2 Answers
This happens when your regional settings on sharepoint server is different from those on client machine in which you edit template in Infopath Designer.
This can happen even if your "client machine" is the same as server machine due to differences in regional settings in operating system (Windows) and settings of sharepoint server.
Infopath Designer and Filler use regional settings from local machine Windows while Sharepoint server uses its own settings.
I think it was discussed before "Date picker show format differently when publish as a web-based form in SharePoint Library" though your situation is probably (because you did not mention any details), "aggravated" because you dealing with Infopath form of type/compatibility Sharepoint List Form in which Infopath form is rigidly locked to underlying sharepoint list.
-
1How is this an answer?? it doesn't solve the problem. Also it isn't even the explanation for the problem. the explanation is from Геннадий Ванин Новосибирск yesterday. in which case, i still need a solution. is there a way from within infopath to set dates to the Date Picker field in a way that the format is M-D-Y. it APPEARS not, but this is hard to accept. Commented Apr 12, 2013 at 18:32
-
There are two types of people in the world. Those who can extrapolate solutions based on missing data. Commented Jul 5, 2017 at 13:52