Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Highlight date in datepicker control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Highlight date in datepicker control

 Post Reply Post Reply
Author
Message
haitao View Drop Down
Newbie
Newbie
Avatar

Joined: 17 August 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote haitao Quote  Post ReplyReply Direct Link To This Post Topic: Highlight date in datepicker control
    Posted: 31 August 2005 at 5:14pm

Hi,

  I am using Access 2003. I have a datepicker control named "datepicker" and a button control named "btnToday" on a form. What i want is that if "btntoday" is clicked, "datepicker" set selection to today's date. I put following code into btntoday_click()

Me!DatePicker.EnsureVisible Date

Me!DatePicker.SelectRange Date, Date

It works only if today's date is not visible.

Thanks!

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 01 September 2005 at 9:24am
Hi,

Actually, you should redraw the control after calling this method. It will work using RedrawControl() method in C++, but currently this method is unavailable for Activex. We'll add it for the nearest release, and for the current moment as a workaround you can try to use code like this:

    DatePicker.Width = DatePicker.Width + Screen.TwipsPerPixelX
    DatePicker.Width = DatePicker.Width - Screen.TwipsPerPixelX


Not beautiful, but should work.

--
WBR,
Serge
Back to Top
haitao View Drop Down
Newbie
Newbie
Avatar

Joined: 17 August 2005
Location: United States
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote haitao Quote  Post ReplyReply Direct Link To This Post Posted: 01 September 2005 at 9:38am

Thanks!

Found the Today button on datepicker control. I will go with it.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.