Rad Scheduler Week-end Days need to Change

8 posts, 0 answers
  1. Praba
    Praba avatar
    11 posts
    Member since:
    Nov 2006

    Posted 06 Nov 2008 Link to this post



    Hi,

    I want to Change the Rad Schedular Week end Days.  One of my Clients from Saudi Arabia requires that the week end should be fall in the Friday.


    I try to set FirstDayOfWeek  but It's making Error.


    How can I set pls let me know.


    Thanks for your help


  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 06 Nov 2008 Link to this post

    Hello Praba,

    Thank you for contacting Telerik support.

    You can use the FirstDayOfWeek property to specify the starting day of the Week, but since by default the LastDayOfWeek is set to "Sunday" you will have to change the latter as well.

    For example, if you want the Week to start in Staturday and end in Friday you should set:
    • FirstDayOfWeek to "Saturday"
    • LastDayOfWeek to "Friday"
    Finally, could you specify what error exactly you are receiving?

    Greetings,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Praba
    Praba avatar
    11 posts
    Member since:
    Nov 2006

    Posted 06 Nov 2008 Link to this post



    Hello Mr.Simon,
        
         By default, you are giving the different colour for week-end Days. I want to change the colour to my custom week-end Days

        As you said in the reply, I applied that  FirstDayOfWeek="saturday" LastDayOfWeek="thursday" But It's showing the Day columns which is mentionend in the range given by this command. So I want to show the week end days with different colour. 
        
        Even I said the custom week-end to Friday as mentioned above...  It's shows the different colour for the SaturDay instead of Friday
      

  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 07 Nov 2008 Link to this post

    Hello Praba,

    Thank you for clarifying.

    You can handle the TimeSlotCreated event and set a custom CSS class to those Slots which are identified as Week Ends.

    Provided that you have the weekEnd CSS class defined on your page you can do the following:

    [C#]
    protected void RadScheduler1_TimeSlotCreated(object sender, Telerik.Web.UI.TimeSlotCreatedEventArgs e) 
        if ((e.TimeSlot.Start.Date.DayOfWeek == DayOfWeek.Thursday) || 
            (e.TimeSlot.Start.Date.DayOfWeek == DayOfWeek.Friday)) 
        { 
            e.TimeSlot.CssClass = "weekEnd"
        }  

    [VB.NET]
    Protected Sub RadScheduler1_TimeSlotCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.TimeSlotCreatedEventArgs) 
        If (e.TimeSlot.Start.[Date].DayOfWeek = DayOfWeek.Thursday) OrElse (e.TimeSlot.Start.[Date].DayOfWeek = DayOfWeek.Friday) Then 
            e.TimeSlot.CssClass = "weekEnd" 
        End If 
    End Sub 

    Additionally, you can check the Selected View or whether the Slot matches the current Date.

    I hope this helps.

    Greetings,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Praba
    Praba avatar
    11 posts
    Member since:
    Nov 2006

    Posted 10 Nov 2008 Link to this post

    Dear Telerik Team,

         Here, My question is to change the Week-end CSS to my desired dates not for the Default SaturDay and SunDay. As you have mentioned in the reply answer,  you are checking the follwing contion

                    if ( e.TimeSlot.Start.Date.DayOfWeek ==  DayOfWeek.Thursday )


    But, It won't give the solution, coz, e.TimeSlot.Start.Date.DayOfWeek   always will give the FirstDayOfWeek only. so this wasn't given me the solution. so pls tell me the correct one to overcome this situation.


    I would be very much happy, if you give the solution.

  7. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 13 Nov 2008 Link to this post

    Hi Praba,

    Did you try the approach I suggested to you previously?

    Could you also clarify what do you mean by "...e.TimeSlot.Start.Date.DayOfWeek   always will give the FirstDayOfWeek only.."?

    I am not sure this is true since the TimeSlotCreated event fires for each Time Slot which includes all days/hours of currently selected View.

    Thank you in advance.

    Sincerely yours,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Praba
    Praba avatar
    11 posts
    Member since:
    Nov 2006

    Posted 13 Nov 2008 Link to this post

    Ya, you are correct and my apology for that incorrect information.I cannot able to remove the default Week-end Colur means,  "rsSunCol"  & "rsSatCol". how can I replace the weekend color by weekdays color.

    my another thread, regarding this....

    http://www.telerik.com/community/forums/aspnet-ajax/scheduler/remove-the-saturday-and-sunday-columns-color.aspx


    Thanks Team,
    Praba
  9. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 14 Nov 2008 Link to this post

    Hello Praba,

    There is no problem at all.

    Please see the forum thread you referred to for the answer of your question.

    Thank you.

    Regards,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017