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

Custom time spans

10 Answers 94 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 1
Andy Green asked on 04 Dec 2009, 01:09 PM
Hi

I want to have the full 24 hours available to scroll in, but on opening the control I'd like to only show a particular time span, say 0700 to 1700, which covers the normal part of the day.

Looking at the available settings I'd have thought that DayView-DayStartTime / DayView-DayEndTime  would do it, but it doesn't, more to the point if you search the help for this there isn't any.

How can I do this.

Andy

10 Answers, 1 is accepted

Sort by
0
Andy Green
Top achievements
Rank 1
answered on 08 Dec 2009, 12:52 PM
I also have another issue in that the appointments dont line up with the correct time down the left hand side. ie for an appointment that starts at 8, it lines up with say 850 on the scheduler.

Is there someone who can deal with these issues, or should I open a support ticket.

Andy
0
Peter
Telerik team
answered on 09 Dec 2009, 12:42 PM
Hello Andy,

The DayStartTime and DayEndTime properties should help you achieve this requirement. I am not sure why you experience problems at your side, but you can test the functionality in this demo:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/customization/defaultcs.aspx 

We are also not sure how to replicate the other problem ("appointments dont line up with the correct time") in a local environment. I suggest you open a support ticket and send us a simple working demo of the issues so we can test it and provide you with a solution.


Greetings,

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
Andy Green
Top achievements
Rank 1
answered on 09 Dec 2009, 02:04 PM
Thanks, I've seen this demo, but you have to explicitly click the 'show 24 hours' link in the footer, I want to have the full day already loaded into the scheduler, but start showing appointments from 0700.

The demo methos forces a postback, which can be slow.

I take it that what I'm looking to do can't be done.

As to the appointments moving out of sync with the scheduler time, this was down to the RowHeight property. I made it 12px to try and reduce the size of the scheuler, but at 15px it works OK.

Andy
0
Peter
Telerik team
answered on 09 Dec 2009, 03:00 PM
Hello Andy,

Try setting ShowFullTime="true" and apply the technique from this kb article:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-scroll-into-view-a-specific-time-slot-on-initial-page-load.aspx


Is this what you need to accomplish?

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
Andy Green
Top achievements
Rank 1
answered on 10 Dec 2009, 08:10 AM
Thanks, Yes this is exaclty what I need, I do have one small problem with my implementation....

I have the Scheduler in a repeater on a masterpage and I'm having trouble getting to the control in the javascript. Also as I'm likely to have more than 1 scheuler control, they all need to jump to 7 am.

Maybe you would consider a 'StartDisplayTime' property.

Andy
0
Accepted
Peter
Telerik team
answered on 14 Dec 2009, 02:45 PM
Hello Andy,

In this case you can use jQuery and cycle through each RadScheduler element:

<script type="text/javascript">
        function pageLoad() 
        {
            $telerik.$(".RadScheduler").each(
                function(intIndex) {
                var scrolledIntoViewSlot = $telerik.getElementByClassName(this, "TimeSlotCssFor8AM", "td");
                      if (scrolledIntoViewSlot)
                          scrolledIntoViewSlot.scrollIntoView();
                }
            );
        }
    </script>

Cheers,

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
Andy Green
Top achievements
Rank 1
answered on 15 Dec 2009, 12:19 PM
Thanks Peter,

This works but still has some issues.  All schedulers do scroll to 8am, but the whole page now scrolls to about halfway down (well to the top of the first 8am appointment, and because of this we loose the top of the page.

I do have a fix which is to have an anchor that the the javascript jumps to after doing the scheduler times, but the page jumps which is not really acceptable

Do you have anymore ideas, otherwise I'll have to go plan B, which is hiding and showing work hours / all hours.

Andy
0
Peter
Telerik team
answered on 18 Dec 2009, 08:40 AM
Hi Andy,

Reversing the order of the RadScheduler elements seems to bring about better results at my end. Please, try this approach and check if it helps in your case:

<script type="text/javascript">
        function pageLoad() {
            var $ = $telerik.$; //creates an alias
            $($(".RadScheduler").get().reverse()).each(
                function(intIndex) {   
                    var scrolledIntoViewSlot = $telerik.getElementByClassName(this, "TimeSlotCssFor8AM", "td");
                    if (scrolledIntoViewSlot)
                        scrolledIntoViewSlot.scrollIntoView();
                }
            );
        }
    </script>

 



Kind 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
Andy Green
Top achievements
Rank 1
answered on 18 Dec 2009, 11:09 AM
Hi Peter.

Thanks for this but I get the same problem, the whole page scrolls to the first 8am appointment, its the page treating the first appointment as an anchor.

Cound this be an IE6 thing?

Andy
0
Peter
Telerik team
answered on 21 Dec 2009, 05:19 PM
Hi Andy,

Here is what I could come up with, but there is still a quick jump:

<script type="text/javascript">
    function pageLoad() {
        var $ = $telerik.$; //creates an alias 
        var numberOfSchedulerElements = $(".RadScheduler").size();
        $($(".RadScheduler").get().reverse()).each(
                function(intIndex) {
                    var scrolledIntoViewSlot = $telerik.getElementByClassName(this, "TimeSlotCssFor8AM", "td");
                    if (scrolledIntoViewSlot)
                        scrolledIntoViewSlot.scrollIntoView();
                    //Scroll to top when last element is processed
                    if (intIndex == numberOfSchedulerElements - 1)
                        window.scrollTo(0, 0);
                }
            );
    
    </script>

I am not sure how to avoid the jump altogether.

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.
Tags
Scheduler
Asked by
Andy Green
Top achievements
Rank 1
Answers by
Andy Green
Top achievements
Rank 1
Peter
Telerik team
Share this question
or