I need to validate few dates in my SP 2010 customnewform.aspx page.
I added the content editor web part, added the script but not able to get the result.

  • ReqstDate : Should not be greater than Today's Date.
  • End user can select yesterdays's date also but not tomorrow's date.
  • By default I need to populate/bind the ReqstDate field with Today's date when the new form loads.
  • Due By date : Should be greater than ReqstDate
  • Orals Date : should not be greater than Due By Date

Is this possible throiugh jQuery or SPServices using PreSaveAction function

  • 1
    could you just share your code.. Commented Oct 8, 2015 at 6:55

1 Answer 1


Maybe you can solve this with simple Validation settings on your list instead. Just from your requirements, you could do the following:

  1. To populate the todays date in ReqstDate , set the default value on the column in the list to Today.

  2. For the logic, go to list settings and add the following formula under Validation settings:

    AND([ReqstDate]<=Today(); AND([Due By date]>[ReqstDate]; [Orals Date]<=[Due By date]))

Depending on your local, the seperator could be , or ; , in my example I used ;

  • Thanks for the reply.May I know,whether this list validation can be applied to different fields or only a single field ? if multiple fields are to be validated how to segregate these.
    – samolpp2
    Commented Oct 8, 2015 at 13:12
  • 1
    You'll have to nest all the fields in AND/OR etc. The outcome will be true/false for the form. The example have 3 checks, and when all are true the form is valid Commented Oct 8, 2015 at 13:31

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.