Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2700
WebDatePicker and postback
posted

I'm sure this is a simple question...   I have a WebDatePicker on my form and want it to auto-postback when I change the date displayed either by typing a new date or selecting from the calendar.

I have set 'Autopostbackflags-valuechanged' to 'On' and have an OnValueChanged handler.  I am still finding however that I have to click off the control before the postback occurs.  I would have expected that as soon as the calendar closed the value would change and trigger the postback...

On a connected note - I really want this to occur without doing a full postback - this is an Ajax control so what do I need to do to just get my OnValueChanged handler to be called without doing a full postback?

Thanks for any suggestions.

Parents
  • 8160
    posted

    Hi,
    WebDatePicker makes postback without click off the control when 'EditMode' is set to 'CalendarOnly', but this will disable entering date from the keyboard. Otherwise you can try with something like this:

        <ig:WebDatePicker ID="WebDatePicker1" runat="server" DropDownCalendarID="WebMonthCalendar1">
        </ig:WebDatePicker>
        <ig:WebMonthCalendar ID="WebMonthCalendar1" runat="server" AutoPostBackFlags-SelectionChanged="On">
        </ig:WebMonthCalendar>
    

     

Reply Children