[JS] get which button FastNavigation is pressed

3 posts, 1 answers
  1. R
    R avatar
    7 posts
    Member since:
    Apr 2013

    Posted 06 Aug 2013 Link to this post

    Hello,

    I have Radcalendar with both navigation buttons ( <<  <   and  >   >>).
    I need to know, which button was pressed in event CalendarViewChanging

    function RadCalendar1_CalendarViewChanging(sender, args) {
    if
    (singleArrow) DoSomething
    else DoSomethingElse   // if double arrow
            }

    Can anyone help?
  2. Answer
    A2H
    A2H avatar
    177 posts
    Member since:
    Mar 2010

    Posted 06 Aug 2013 Link to this post

    Hello,

    Please use the below javascript implementation to achieve your requirement

    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
          <script type="text/javascript" language="javascript">
              function CalendarViewChanging(sender, eventArgs) {
                  
                  if (eventArgs.get_step() == 3) {
                      alert("Forward double arrow clicked")
                  }
                  if (eventArgs.get_step() == -3) {
                      alert("Backward double arrow clicked")
                  }
                  if (eventArgs.get_step() == 1) {
                      alert("Forward single arrow clicked")
                  }
                  if (eventArgs.get_step() == -1) {
                      alert("Backward single arrow clicked")
                  }
              }
          </script>
      </telerik:RadScriptBlock>


    Thanks,
    A2H
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. R
    R avatar
    7 posts
    Member since:
    Apr 2013

    Posted 07 Aug 2013 Link to this post

    Thanks, so simple solution!
Back to Top