This is a migrated thread and some comments may be shown as answers.

Client side - Selected Date

6 Answers 94 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mike Taylor
Top achievements
Rank 1
Mike Taylor asked on 26 Nov 2009, 05:51 PM
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.

6 Answers, 1 is accepted

Sort by
0
Accepted
Genady Sergeev
Telerik team
answered on 27 Nov 2009, 09:01 AM
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.
0
Mike Taylor
Top achievements
Rank 1
answered on 27 Nov 2009, 09:10 AM
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

0
Peter
Telerik team
answered on 27 Nov 2009, 12:54 PM
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.
0
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 28 Oct 2010, 04:01 PM
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!
0
Peter
Telerik team
answered on 03 Nov 2010, 03:16 PM
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
0
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 04 Nov 2010, 11:43 AM
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.
Tags
Scheduler
Asked by
Mike Taylor
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Mike Taylor
Top achievements
Rank 1
Peter
Telerik team
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or