Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Telerik raddatetimepicker

Posted on 2016-08-24
11
Medium Priority
?
114 Views
Last Modified: 2016-08-25
Hello,
Is there a way to highlight todays date on the datetimepicker calendar. I am using telerik raddatetimepicker. Is it setting a special day?

Cheers!
0
Comment
Question by:RIAS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 41769799
Hi RIAS,

Can you please try this?

 
<telerik:RadDatePicker runat="server">
    <Calendar runat="server">
        <SpecialDays>
            <telerik:RadCalendarDay Repeatable="Today" ItemStyle-BackColor="Red">
            </telerik:RadCalendarDay>
        </SpecialDays>
    </Calendar>
</telerik:RadDatePicker>
0
 

Author Comment

by:RIAS
ID: 41769858
Hello Gautham Janardhan,
I am using vb.net windows can you please suggest in vb.net code
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 41769880
Dim _fromControl As RadDatePicker =  New RadDatePicker()  
Dim day As RadCalendarDay =  New RadCalendarDay()  
day.Date=DateTime.Now.Date 
day.ItemStyle.BackColor = System.Drawing.Color.LightBlue 
_fromControl.Calendar.SpecialDays.Add(day)

Open in new window

0
Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

 

Author Comment

by:RIAS
ID: 41769885
Hello Ramkisan,

Where do I put this code?On which event?
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 41769887
create a function and call it onLoad.
0
 

Author Comment

by:RIAS
ID: 41769891
Hello,

Getting an error : calendar is not a member of raddatetimepicker ?

Had found a code on telerik blog but the app is crashing as soon as it hits the code :

'Private Sub RadDateTimePicker1_Opened(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadDateTimePicker1.Opened
    '    Dim dtcalendar As RadDateTimePickerCalendar = DirectCast(Me.RadDateTimePicker1.DateTimePickerElement.GetCurrentBehavior(), RadDateTimePickerCalendar)
    '    Dim calendar As RadCalendar = dtcalendar.Calendar
    '    calendar.SpecialDays.Add(New RadCalendarDay(New Date(2010, 11, 10)))
    'End Sub
0
 
LVL 12

Assisted Solution

by:Ramkisan Jagtap
Ramkisan Jagtap earned 2000 total points
ID: 41769895
Private Sub RadDateTimePicker1_Opened(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadDateTimePicker1.Opened
  
Dim day As RadCalendarDay =  New RadCalendarDay()  
day.Date=DateTime.Now.Date 
day.ItemStyle.BackColor = System.Drawing.Color.LightBlue 
RadDateTimePicker1.SharedCalendar.SpecialDays.Add(day)       


End Sub 

Open in new window

0
 

Author Comment

by:RIAS
ID: 41769911
.SharedCalendar is not a member of radatetimpicker
0
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 41769916
Please check this,



Protected Sub Page_Load(ByVal sender As Object, _
        ByVal e As System.EventArgs) Handles Me.Load

    If Not IsPostBack Then

Dim day As RadCalendarDay =  New RadCalendarDay()  
day.Date=DateTime.Now.Date
day.ItemStyle.BackColor = System.Drawing.Color.Red
RadDateTimePicker1.SharedCalendar.SpecialDays.Add(day)      

 End If
End Sub
0
 

Author Comment

by:RIAS
ID: 41769923
.SharedCalendar is not a member of radatetimpicker
0
 
LVL 12

Accepted Solution

by:
Ramkisan Jagtap earned 2000 total points
ID: 41769933
My bad, as you are using RadDateTimePicker for winforms this will not be available.
Please check the following Teletik Forum:

http://www.telerik.com/forums/datetimepicker-highlight-today-s-date-only

Hope this helps.
0

Featured Post

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question