Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Date Picker Control - Locking/Unlocking

Posted on 2000-03-28
6
Medium Priority
?
459 Views
Last Modified: 2013-12-25
How do you lock/unlock the Date Picker Control?  There is no LOCKED property for the Date Picker Control.

Sheila
0
Comment
Question by:baileys
[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
  • 3
  • 2
6 Comments
 
LVL 20

Expert Comment

by:hes
ID: 2665606
To lock the date use the following

DTPicker1.MaxDate = Now
DTPicker1.MinDate = Now

or instead of Now the date you want it locked to.

To unlock

DTPicker1.MaxDate = "12/31/9999"
DTPicker1.MinDate = "01/01/1601"
0
 

Author Comment

by:baileys
ID: 2665719
That works to lock the control, but I also want to disable the dropdown calendar.

Sheila
0
 
LVL 20

Accepted Solution

by:
hes earned 300 total points
ID: 2665735
dtpicker1.UpDown =True
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Expert Comment

by:damienm
ID: 2668998
Why don't you set the datepickers enabled property to false.

dtPicker.enabled = false
0
 

Author Comment

by:baileys
ID: 2671518
If I set the enabled to false, the dates are shaded.
0
 

Author Comment

by:baileys
ID: 2671522
Thanks, that worked.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

604 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