Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

DateTimeControl Comparision

$
0
0
Hi All,

I am facing an issue with datetime control validation. I have two datetime controls date1 & date2 and the validation should be always date2 >date1.

I am using the below code for the validation and working properly in my local & U.S environment, but failed for German client. They have selected Date2 > Date1, But still the validation firing and prompting the error message Date 2 Should be > Date1. 

<SharePoint:DateTimeControl ID="dtDateBegin" runat="server" DateOnly="true" LocaleId="1033" />

<SharePoint:DateTimeControl ID="dtDateEnd" runat="server" DateOnly="true" LocaleId="1033" />

<asp:CompareValidator ID="compDate"  runat="server" ValidationGroup="personalGroup" Display="Dynamic" ForeColor="red" Type="Date" Operator="GreaterThan" ControlToCompare="dtDateBegin$dtDateBeginDate"                                       ErrorMessage="DateEnd should be greater than DateBegin" ControlToValidate="dtDateEnd$dtDateEndDate"></asp:CompareValidator>

Let me know if you need any more information!

Thanks In Advance,
Kumar.

Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>