DatePicker OnDateChanged

Posted by: blitzsr on 10 September 2017, 11:43 am EST

  • Posted 10 September 2017, 11:43 am EST

    HI, how can I use the event "OnDateChanged"?



    .aspx:

    <c1:C1InputDate ID="txtMin" runat="server" ShowTrigger="true" 
    OnDateChanged="txtMin_DateChanged">
    </c1:C1InputDate>



    .cs:

        protected void txtMin_DateChanged(object sender, EventArgs e)
    {
    DateTime dateNow = DateTime.Now;
    DateTime dateMax = DateTime.Now;

    dateMax = dateNow.AddDays(30);

    txtMax.MaxDate = dateMax;
    }



    Thanks,
  • Replied 10 September 2017, 11:43 am EST

    The OnDateChanged is a server side event and it will fire only when there is a postback (for eg. when a server side button is clicked).
    If you wish to capture the DateChanged without a postback, you can handle the OnClientDateChanged event and set its options using jQuery. For more details, please refer to the following link for it's documentation on client side options : http://wijmo.com/wiki/index.php/InputDate

    Regards
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels