I am having a datetime control in sharepoint custom webpart
<SharePoint:DateTimeControl runat="server" ID="txtUKdtofAdm" LocaleId="2057" DateOnly="True"
OnValueChangeClientScript="validateControlsUK();" AutoPostBack="true"
OnDateChanged="txtUKdtofAdm_OnDateChanged"></SharePoint:DateTimeControl>
I want to call a js as well as server side function on date changed.I have done as above but, client side function does not execute. can anyone help me in order to get this workin wherein if a date is changed than both js on client side and onchange server side event should work.
In my case only server side is getting fired.
Kindly help. thank you in advance
Ok, I got the solution to this.
I removed
AutoPostBack="true"and in javascript I used__doPostBack('<%= txtUKdtofAdm.Controls[0].ClientID %>', '');which forces a postback which in turn fires
OnDateChanged="txtUKdtofAdm_OnDateChanged"