Client side - Selected Date

7 posts, 1 answers
  1. Mike Taylor
    Mike Taylor avatar
    27 posts
    Member since:
    Sep 2009

    Posted 26 Nov 2009 Link to this post

    Hello,

    I'm looking for a way, but still didn't find, to get in javascript (client side) the current selected date of the scheduler.

    Thank you.
  2. Answer
    Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 27 Nov 2009 Link to this post

    Hi Mike Taylor,

    You can rely on the client side property get_selectedDate() of the RadScheduler client object. Example:

    alert($find("RadScheduler1").get_selectedDate());


    Regards,
    Genady Sergeev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mike Taylor
    Mike Taylor avatar
    27 posts
    Member since:
    Sep 2009

    Posted 27 Nov 2009 Link to this post

    Thank you, it works great !

    I think you should update the client-side RadScheduler object documentation because this method is not specified :
    http://www.telerik.com/help/aspnet-ajax/client-side-objects-radscheduler.html

  5. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 27 Nov 2009 Link to this post

    Hello Mike,

    Thanks for spotting this. We will update the documentation shortly.


    Regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 28 Oct 2010 Link to this post

    I'm dealing with a strange behavior here.

    function SelectDate(_DateValue) {
        var myDate = new Date(_DateValue);
        var selDate = $find('<%= RadSchedulerArmy.ClientID %>').get_selectedDate().format('MMM dd, yyyy');
        alert('_DateValue: ' + myDate.format('MMM dd, yyyy') + '\n' + 'selDate: ' + selDate);
        if (selDate != myDate.format('MMM dd, yyyy')) {
            $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("-||DATE||-" + myDate.format('MMM dd, yyyy'));
        }
    }

    The preceding story:
    User clicks a row in a grid
    One column has a job date
    The value is extracted in the RowClick() event and function SelectDate() is triggered
    Now, in the alert, the current SelectedDate of the Scheduler is always today's date...
    So the condition is always true and needless UI refresh happens
    My aim was to prevent a AJAXified refresh if the Job date on the selected row was equal to Scheduler's selected date.

    Any F1 please!
  7. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 03 Nov 2010 Link to this post

    Hello Hassan,

    I tested the get_selectedDate() method but it worked as expected. Which version do you use? Have you tried with the latest beta version - 2010.3.1022?


    All the best,
    Peter
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 04 Nov 2010 Link to this post

    We are using v2010.1.519.35. I'll have to talk with my lead as i think some issues will be resolved with a upgrade. We are about to release two other projects therefore standing out for an upgrade might meet a lot of resistance at the moment. They also use Telerik heavily. There is wait there.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017