I want to create an input form in SharePoint.

In this form you have to select a date. It must be the date 2016/01/20 or 2016/01/27 (in my country it's called 20.01.2016 and 27.01.2016. The column is called Datum). When you try another date, an error message, which I define should appear.

I tried this code:


The Error message, which I defined, appears. But the problem is, it appears all the time. Even if I enter the correct date. What's wrong with this code?

  • If you are running different regional settings on the site, try to change the semicolon (;) to commas (,). – Christoffer Jan 13 '16 at 7:50

I tried it in my German SharePoint 2013 on-prem environment, but maybe it is working in SPO as well.

The formular itself after you saved it looks like this:

enter image description here


You can also use the english formular:


Assuming your "Datum" field is a Date type, then you need to compare dates to dates and not dates to strings. I think that's the reason.

The english formular will be translated into german after you saved it.

  • If my answer completly works for you you can also mark it as the answer to your question to help everbody which has the same problem. – Patrick Jan 13 '16 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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