Hi,
How can I postback when I use the keyboard to change the value in the WebDatePicker? I know how to accomplish this by selecting from the calendar.
Thank you,
Trent
Hello tnguen13,
What I can suggest in for achieveing your requirement is turn on the WebDatePicke`s AutopostBackFlag of Value changed as well as Enter Key Down as such:
<ig:WebDatePicker ID="WebDatePicker1" runat="server"> <AutoPostBackFlags EnterKeyDown="On" ValueChanged="On" /> </ig:WebDatePicker>
<ig:WebDatePicker ID="WebDatePicker1" runat="server">
<AutoPostBackFlags EnterKeyDown="On" ValueChanged="On" />
</ig:WebDatePicker>
I am also attaching a small sample project I used to test this for your reference. My test was performed with version 12.20122.2075 of NetAdvantage. If the project does not work correctly on you side or it is not an accurate demonstration of what are you trying to do please feel free to modify it and send it back, or send a small sample project of your own where the issue is reproducible. Also some additional information would be highly appreciated.
Hi Viktor,
When I added the AutoPostBackFlags-EnterKeyDown="On", the value change from selecting the date on the calendar does not trigger the postback.
Hi Trent,
You may enable autopostback on enter key. Similar way can be triggered a postback on lost focus (value change). To trigger postback on other keys or events, application may process corresponding client side events (like KeyUp), check event/keyCode, check current value in editor (if it is valid and complete), etc, and call __doPostBack(sender.get_uniqueID(), '') or use similar statements.
Example for autopostback:
<ig:WebDatePicker ID="WebDatePicker1" runat="server"> <AutoPostBackFlags EnterKeyDown="On" /></ig:WebDatePicker>