I used ID the way you are suggesting, and it works for textboxes, radio buttons but not for DTC doing more digging I found that The DTC has got text box and to get the value of the text box.. we have to use dtcdeadline$dtcdeadlineDate By using dtcdeadline$dtcdeadlineDate, the required field validators work, but this scenario of using it in CompareValidator is not working
I had to use the above double ID value in controToValidate property for required field validator, which works fine On Fri, Jul 19, 2013 at 4:06 PM, Ishai Sagi <[email protected]> wrote: > For example:**** > > ** ** > > <sharepoint:datetimecontrol runat=”server” id=”dtcDeadline” />**** > > ** ** > > <script>**** > > Var d = document.getElementByID(“<%=dtcDeadline.ClientID %>”);**** > > </script>**** > > ** ** > > **[image: Description: Description: C:\Users\Brian\Pictures\EXD > Logos\Extelligent logo no text.jpg]***Ishai Sagi* | Solutions Architect > 0488 789 786 | [email protected] | www.sharepoint-tips.com | > @ishaisagi<http://twitter.com/ishaisagi> > | MVP Profile <https://mvp.support.microsoft.com/profile/Ishai> **** > > ** ** > > *From:* [email protected] [mailto:[email protected]] *On > Behalf Of *Ajay > *Sent:* Friday, 19 July 2013 1:59 PM > *To:* ozMOSS > *Subject:* SharePoint date time control**** > > ** ** > > I have to validate date time control, if it has any value and based on > that allow a another field to be blank or not.**** > > The text box for dtc is referenced by dtcDeadline$dtcdeadlineDate**** > > following line does not look good**** > > ** ** > > var deadlineDate = > document.getElementById('<%=dtcDeadline$dtcdeadlineDate.ClientID%>');**** > > ** ** > > ** ** > > Am I missing some easy fix for this... > > Cheers > ajay**** > > ** ** > > _______________________________________________ > ozmoss mailing list > [email protected] > http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss > >
<<image002.jpg>>
_______________________________________________ ozmoss mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
