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

Rad Scheduler Week-end Days need to Change

7 Answers 216 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Praba
Top achievements
Rank 1
Praba asked on 06 Nov 2008, 11:29 AM


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


7 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 06 Nov 2008, 01:09 PM
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.
0
Praba
Top achievements
Rank 1
answered on 07 Nov 2008, 01:16 AM


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
  

0
Simon
Telerik team
answered on 07 Nov 2008, 11:45 AM
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.
0
Praba
Top achievements
Rank 1
answered on 11 Nov 2008, 02:39 AM
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.

0
Simon
Telerik team
answered on 13 Nov 2008, 06:10 PM
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.
0
Praba
Top achievements
Rank 1
answered on 14 Nov 2008, 01:44 AM
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
0
Simon
Telerik team
answered on 14 Nov 2008, 03:30 PM
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.
Tags
Scheduler
Asked by
Praba
Top achievements
Rank 1
Answers by
Simon
Telerik team
Praba
Top achievements
Rank 1
Share this question
or