0

I'm trying to write an InfoPath form from code.

I'm working with the xml of a form, and when I write a date it gives me no error but when I open the form in SharePoint and click on Save, it says that the dates are not correct, exactly it says:

Date Field "Only date allowed"

Note: I have tried with different formats and even that the format is the same that is showed if you choose a correct date.

Note: I use to write the xml element the next code:

writer.WriteElementString("my", "EntryDate",null, "");

1 Answer 1

0

Check the properties of the date control. Set data type to Text (String) and change format to XML (Click format button and select "None" option.


http://social.msdn.microsoft.com/Forums/en-US/53803456-c1f0-4a7e-91d0-c44df2965877/date-field-only-date-allowed?forum=sharepointcustomizationlegacy

1
  • thanks Ali, but I prefer if possible not to change the data type, is ok being date. Commented Aug 8, 2014 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.