RadMonthYearPicker - automatic selection

3 posts, 0 answers
  1. Lukasz Kalbarczyk
    Lukasz Kalbarczyk avatar
    24 posts
    Member since:
    Feb 2010

    Posted 23 Sep 2011 Link to this post

    Is it possible to select the month using RadMonthYearPicker without clicking "[OK]" in the PopupControl (like using DateTimePicker)?
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Sep 2011 Link to this post

    Hi Lukasz Kalbarczyk,

    You can select the month by using ClientEvent-OnMonthSelected  as follows.

    Javascript:
    <script type="text/javascript" language="javascript">
    function OnMonthSelected(sender, evtargs)
        {
            var month = evtargs.get_selectedCell().innerText;
            sender.get_textBox().innerText = month;
            sender.hidePopup()
        }
    </script>

    Thanks,
    Princy.

  3. Lukasz Kalbarczyk
    Lukasz Kalbarczyk avatar
    24 posts
    Member since:
    Feb 2010

    Posted 26 Sep 2011 Link to this post

    function OnMonthSelected(sender, evtargs)
        {
            var month = evtargs.get_newDate();
            sender.set_selectedDate(month);
            sender.hidePopup()
        }

    This works better :) Thanks.
Back to Top