I have designed a gridview in that one of my template field will be like
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="lblTrialPeriodEnds" runat="server"
Text='<%# Eval("trialPeriodEnds","{0:dd/MM/yyyy}") %>'
Width="61px"></asp:Label>
</ItemTemplate>
<HeaderTemplate>
TrialPeriodEnds
</HeaderTemplate>
<EditItemTemplate>
<asp:TextBox Id="txtRenew" runat="server"
Text='<%# Eval("trialPeriodEnds","{0:dd/MM/yyyy}") %>'
Width="61px" />
</EditItemTemplate>
</asp:TemplateField>
Now what I need is I will have a pop up calendar after the text box when I click on edit. If I select a date greater than the date existed in the text box I would like to set my database column to Yes..
Any idea please….
You can convert text from text box into DateTime object and use DateTime class methods or just subtract two DateTime objects which will give you TimeSpan objects. Then you can compare dates as per your requirements.