Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is there a way to put validation for date datatype in the backend. I am thinking of creating a user control for this.
Please let me know if there is already a control available or a better way to handle this.
This is my need:
I have two date fields and I have to validate between these two.
1 - If the document is new, the first date field value shouldn't be less than today.
2 - I have to allow second date field value always greater than first.
Using a user control I can achieve the 2. I am not 100% sure about 1 when user trying to edit the document and when the document is new.
Please let me know.
Thanks in Advance
What you can do is make a sorting in your xslt somthing like
<xsl:sort select="current()/secondDate" order="descending" />
This will make sure that it will order it by using the secondDate instead of the default pusblished node
Hope this helps
Thank you for the update. I think I was not clear enough in my question. This is for backend/editor user.
I have a document type which have startdate and enddate as two fields of date datatype..I would like to handle this scenario between these to data fields for backend user/editor not the end user.
1 - If the document is new of this, the first date field value shouldn't be less than today.
The second scenario( 2) I can handle using user control with multiple date controls, But for the first scenario I need to check if the document created is new and not saved then only I have to validate that. If you or anyone have an idea on this please let me know.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted