Custom time spans

11 posts, 1 answers
  1. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 04 Dec 2009 Link to this post

    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
  2. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 08 Dec 2009 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 09 Dec 2009 Link to this post

    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.
  5. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 09 Dec 2009 Link to this post

    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
  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 09 Dec 2009 Link to this post

    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.
  7. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 10 Dec 2009 Link to this post

    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
  8. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 14 Dec 2009 Link to this post

    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.
  9. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 15 Dec 2009 Link to this post

    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
  10. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 18 Dec 2009 Link to this post

    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.
  11. Andy Green
    Andy Green avatar
    120 posts
    Member since:
    Jul 2009

    Posted 18 Dec 2009 Link to this post

    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
  12. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 21 Dec 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017