Print Page | Close Window

Chaging the format of a day in a DatePicker

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=5273
Printed Date: 16 November 2024 at 10:50am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Chaging the format of a day in a DatePicker
Posted By: EMoscosoCam
Subject: Chaging the format of a day in a DatePicker
Date Posted: 11 October 2006 at 7:32pm
Is it possible to change the forecolor or the background color of a given date within the DatePicker control?
 
Something like:
   DatePicker1.Date("2005-10-01").BackColor=RGB(200,10,20)
 
Thanks a lot.



Replies:
Posted By: sserge
Date Posted: 12 October 2006 at 3:34am
Hi,

Yes, that's possible, but not in this way.

Look at our DatePickerSample application and check "Customize Special Days" box.

As you can see, it works by enabling DayMetrics notification and handling it.

Example for your case:

Private Sub wndDatePicker_DayMetrics(ByVal Day As Date, ByVal Metrics As XtremeCalendarControl.IDatePickerDayMetrics)
    If Day = #10/1/2005# Then
        Metrics.BackColor = RGB(200, 10, 20)
    End If
End Sub


--
WBR,
Serge
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net