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
2715
too many click
posted

I use WebMonthCalendar as dropdown for WebDatePicker
when I only want to change the year I have to select the day after selecting then year

is there a way around that?

Parents
  • 15979
    Suggested Answer
    posted

    Hello Christian,

    If I understand you correctly you want to select year directly instead of selecting day and month first.

    There is way to force the calendar to open its year view on first load instead of day calendar.

    <script type="text/javascript" id="igClientScript">

     

                var datePicker;

     

                function DatePicker_CalendarOpening(sender, eventArgs) {

     

                    datePicker = sender;

     

                    setTimeout("showMonths()", 10);

                }

     

                function showMonths() {               

     

                    datePicker.get_calendar().showList(1);

                }

     

     

        </script>

    Let me know if this solution is acceptable in your scenario.

Reply Children