I had fixed it as i the text box is inside an ajax update panel and that's why the event is not firing.I had added a trigger in the update panel for that text box and it worked fine.
<triggers>
<asp:asyncpostbacktrigger controlid="txtDate" eventname="TextChanged" xmlns:asp="#unknown" />
</triggers>