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
2070
Webdate chooser dropdown unwanted year display
posted

Hai

I have two web date chooser namely start date and end date.  When I choose start date as today's date I set the mindate of end web date chooser as today's date in client side value change event.

 

oEndDateCt2.setMinDate(oStartDateValue);

 

in order restrict the user not to select the lesser date than start date. But in year dropdown it shows previous years since it can't be selected. If I try to select previous year it automatically selects current year. But I don't want  to show the previous year values display. Please refer the attachment. Please help me in this regard.

Thanks in advance

Sridhar

Parents
  • 24497
    posted

    Hi Sridhar,

    The dc.setMinDate sets min date for WebDateChooser only. To set min date for drop-down calendar, the Calendar member should be used. Below is example:

    <script type="text/javascript">
    function setMin()
    {
     var dc = igdrp_getComboById('<%=WebDateChooser1.ClientID%>');
     var min = new Date(2007, 0, 10);
     dc.setMinDate(min);
     dc.Calendar.MinDate = min;
    }
    </script>
    <igsch:WebDateChooser ID="WebDateChooser1" runat="server">
    </igsch:WebDateChooser>
    <input type="button" onclick="setMin()" value="setMin" />

     

Reply Children
No Data