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

URGENT : How to remove selected item on calendar...

3 Answers 137 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Test
Top achievements
Rank 1
Test asked on 20 Feb 2009, 09:00 AM
Hello Everyone,

I m using calendar control in one of my application.

code is like this

<telerik:RadCalendar ID="RadCalendar1" runat="server" Font-Names="Verdana" OnDayRender="CustomizeDay" 
                Skin="Sunset" EnableMultiSelect="false" Width="202" Height="150"
                <ClientEvents OnDateSelected="onDateSELClick" /> 
            </telerik:RadCalendar> 


Now when i click on any date on calendar then is show as selected. i dont't want to show as selected.

how can i do ?
please help me

thanks in advance

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 20 Feb 2009, 09:31 AM
Hello Mayur,

You can cancel the date selection conditionally using the following approach:
<script type="text/javascript" language="javascript"
  function DateSelecting(sender, args) 
  { 
    args.set_cancel(true); 
  } 
</script> 

<ClientEvents OnDateSelecting="DateSelecting" /> 

Alternatively you can disable the selection at all:
Read-Only Calendar

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Test
Top achievements
Rank 1
answered on 20 Feb 2009, 10:23 AM
Hello thanks for reply.

but i dont want to cancel the selected event. but suppose when i click on 1. then is show as selected. i ust want that 1 show as normal as others.

not shown as selected.


0
Shinu
Top achievements
Rank 2
answered on 20 Feb 2009, 12:30 PM
Hi Mayur,

Try adding following style for SelectedDayStyle-CssClass. I tried to apply normal default style for the selected date as well.

CSS:
<style type="text/css"
.MyClass  
    background-color:#F4EDE1 !important; 
    font:11px arial,tahoma,sans-serif !important; 
    color:Black!important; 
    border0px !important; 
    border-top0px !important; 
.MyClass a 
     height20px
     vertical-align:bottom !important; 
     background-color:#F4EDE1 !important; 
     font:11px arial,tahoma,sans-serif !important; 
     color:Black!important; 
     border0px !important; 
</style> 

ASPX:
<telerik:RadCalendar ID="RadCalendar1" runat="server" Font-Names="Verdana"   SelectedDayStyle-CssClass="MyClass" 
                Skin="Sunset" EnableMultiSelect="false" Width="202" Height="150">  
                <ClientEvents OnDateSelected="onDateSELClick" />  
</telerik:RadCalendar> 

Thanks,
Shinu.
Tags
Calendar
Asked by
Test
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Test
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or